can_stand bug (the one where you punch yourself to fix it)
Created by: gbasood
[09:06:24] Kammerjunk/(Ginger Beach) (JMP): I have no idea why it happens, but it can make Asimov medborgs a bit of a bother post-cloning [09:06:25] Pseudonym/(Nestachack) (JMP): can_stand = (canstand_l && canstand_r) [09:06:27] Pseudonym/(Nestachack) (JMP): seems like [09:06:38] Pseudonym/(Nestachack) (JMP): legcode might be poop [09:06:50] Diethyl/(Adam Savato) (JMP): I has been happening for a long while now. [09:06:55] Diethyl/(Adam Savato) (JMP): it* [09:07:10] Pseudonym/(Nestachack) (JMP): canstand_r and canstand_l are set based on if r/l_leg/foot is_usable returns true [09:07:25] Pseudonym/(Nestachack) (JMP): it's updated on handle_organs
under the handle_organs
proc in modules\organs\organ.dm:
var/canstand_l = 1
var/canstand_r = 1
var/legispeg_l = 0
var/legispeg_r = 0
var/hasleg_l = 1 //Have left leg
var/hasleg_r = 1 //Have right leg
var/hasarm_l = 1 //Have left arm
var/hasarm_r = 1 //Have right arm
//var/datum/organ/external/E = organs_by_name["l_foot"]
var/datum/organ/external/E
E = organs_by_name["l_leg"]
if(!E.is_usable()) //The leg is missing, that's going to throw a wrench into our plans
canstand_l = 0
hasleg_l = 0
legispeg_l = E.is_peg() //Need to check this here for the feet
E = organs_by_name["r_leg"]
if(!E.is_usable())
canstand_r = 0
hasleg_r = 0
legispeg_r = E.is_peg()
//We can stand if we're on a peg leg, otherwise same logic.
E = organs_by_name["l_foot"]
if(!E.is_usable() && !legispeg_l)
canstand_l = 0
E = organs_by_name["r_foot"]
if(!E.is_usable() && !legispeg_r)
canstand_r = 0
E = organs_by_name["l_arm"]
if(!E.is_usable())
hasarm_l = 0
E = organs_by_name["r_arm"]
if(!E.is_usable())
hasarm_r = 0
//Can stand if we have both of our legs (with leg and foot parts present, or an entire pegleg)
//Has limbs to move around if at least one arm or leg is at least partially there
can_stand = (canstand_l && canstand_r)
So IN THEORY either handle_organs calls aren't happening when they should OR is_usable is fucky