Jump to content

Comments


Recommended Posts

I stumbled across this the other day thought it was hilarious.

 

--V2C: What is this for??function OnMessageReceived( username, message )--[[local player = ThePlayerif player ~= nil thenlocal hud = player.HUDif hud ~= nil and hud.controls ~= nil thenhud.controls:OnMessageReceived( username, message )endend]]end
Link to comment
Share on other sites

--V2C: What is this for??

I think I've seen that before, I always wonder if they actually thought nobody would ever see these or if they left them in purely for our benefit.

 

I know I can use a laugh sometimes when I'm digging for an obscure function/variable with an unintuitive name.

ACTIONS.GOHOME.fn = function(act)    --this is gross. make it better later.    if act.target.components.spawner then        return act.target.components.spawner:GoHome(act.doer)    elseif act.target.components.childspawner then        return act.target.components.childspawner:GoHome(act.doer)    elseif act.pos then        if act.target then            act.target:PushEvent("onwenthome", {doer = act.doer})        end        act.doer:Remove()        return true    endend
Edited by tetrified
Link to comment
Share on other sites

I quite liked seeing this on line 594 in "player_common.lua".

--we disabled health penalty for PAX. I think I prefer it. If we like it, do it properly.inst.components.health:RecalculatePenalty(true)-- inst:RemoveComponent("sanityaura")--inst:RemoveComponent("humanity")--inst:RemoveComponent("haunter")--don't ignore sanity any moreinst.components.sanity.ignore = false
Link to comment
Share on other sites

I remember I found a short conversation in one of the files... Ahh, gotta go look for it now. Will edit it in if I find it.

 

Edit:

 

Not the one I was looking for, but zing!

function Inventory:DropEverythingWithTag(tag, keepcharacterspecific, exclude)    -- Only allow one copy of a char specific item     -- #srosen this does prevent you taking mult copies of books or other char's books, etc, which isn't great...    -- #v2c books are not "irreplaceable" and can be crafted so we don't care who takes them

A few amusing ones I found on the search (frograin):

--V2C: FIXME: nobody calls this ever... c'mon...function self:StopTracking(inst)    _frogs[inst] = nilend

saveindex (Vito doesn't know something!? this must've been before his ascension...):

function SaveIndex:FixupServerData()    -- V2C: THIS IS WRONG if it runs on clients    --      however it looks like it's for deprecated stuff so....    --      I don't know =) ask charles.    for idx, slot in ipairs(self.data.slots) do

resurrector:

--this is a bit presentationally-specific for component land but whatever.function Resurrector:Resurrect(dude)

smallbird:

local function OnAttacked(inst, data)    --print("smallbird - OnAttacked !!!")    if inst:HasTag("teenbird") and data.attacker ~= nil and (data.attacker == inst.components.follower.leader or data.attacker:HasTag("player")) then        --print("  what did I ever do to you!?")        -- well i was just annoyed, but now you done pissed me off!        SetTeenAttackDefault(inst)    end

Hmm... I didn't find the conversation I was looking for. I seem to remember it being between Kaj and Seth, but that's nowhere to be found, now. Guess it got cleared away  :wilson_cry:

Edited by rezecib
Link to comment
Share on other sites

There were some good ones in today's patch.

player_common:

    --V2C: Unfortunately the sleeping bag code is incredibly garbage    --     so we need all this extra cleanup to cover its edge cases

controlsscreen:

function ControlsScreen:OnDestroy()	--print("whatsthis")    --itsgoodstuff
Link to comment
Share on other sites

smallbird.lua

local function SetTeenAttackDefault(inst)
    --print("teenbird - Set phasers to 'KILL'")
    inst:RemoveTag("peck_attack")
    inst.components.combat:SetDefaultDamage(TUNING.TEENBIRD_DAMAGE)
    inst.components.combat:SetAttackPeriod(TUNING.TEENBIRD_ATTACK_PERIOD)
end
 
local function SetTeenAttackPeck(inst)
    --print("teenbird - Set phasers to 'PECK'")
    inst:AddTag("peck_attack")
    inst.components.combat:SetDefaultDamage(TUNING.TEENBIRD_DAMAGE_PECK)
    inst.components.combat:SetAttackPeriod(TUNING.TEENBIRD_PECK_PERIOD)
end

Wonder how many will get the reference lol

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...