New vending machine, enabling Ian clothes, bug fixes, map update

This commit is contained in:
ZomgPonies
2013-09-28 01:38:18 -04:00
parent 853d490660
commit 78f14f11cc
24 changed files with 1970 additions and 1825 deletions
+8 -4
View File
@@ -75,7 +75,7 @@
//Robotic limb malfunctions
var/malfunction = 0
if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam))
if (E.status & (ORGAN_ROBOT|ORGAN_PEG) && prob(E.brute_dam + E.burn_dam))
malfunction = 1
//Broken limbs hurt too
@@ -126,6 +126,8 @@
//Check arms and legs for existence
var/canstand_l = 1 //Can stand on left leg
var/canstand_r = 1 //Can stand on right leg
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
@@ -135,15 +137,17 @@
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
canstand_l = 0
hasleg_l = 0
legispeg_l=E.status & ORGAN_PEG
E = get_organ("r_leg")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
canstand_r = 0
hasleg_r = 0
legispeg_r=E.status & ORGAN_PEG
E = get_organ("l_foot")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED) && !legispeg_l)
canstand_l = 0
E = get_organ("r_foot")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED) && !legispeg_r)
canstand_r = 0
E = get_organ("l_arm")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
@@ -152,7 +156,7 @@
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
hasarm_r = 0
// Can stand if have at least one full leg (with leg and foot parts present)
// Can stand if have at least one full leg (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
has_limbs = hasleg_l||hasleg_r||hasarm_l||hasarm_r
+54 -18
View File
@@ -77,7 +77,7 @@
if(status & ORGAN_DESTROYED)
return 0
if(status & ORGAN_ROBOT)
if(status & (ORGAN_ROBOT|ORGAN_PEG))
brute *= 0.66 //~2/3 damage for ROBOLIMBS
burn *= 0.66 //~2/3 damage for ROBOLIMBS
@@ -104,7 +104,7 @@
if(used_weapon)
add_autopsy_data("[used_weapon]", brute + burn)
var/can_cut = (prob(brute*2) || sharp) && !(status & ORGAN_ROBOT)
var/can_cut = (prob(brute*2) || sharp) && !(status & (ORGAN_ROBOT|ORGAN_PEG))
// If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking
if((brute_dam + burn_dam + brute + burn) < max_damage || !config.limbs_can_break)
if(brute)
@@ -138,7 +138,7 @@
burn = max(0, burn - can_inflict)
//If there are still hurties to dispense
if (burn || brute)
if (status & ORGAN_ROBOT)
if (status & (ORGAN_ROBOT|ORGAN_PEG))
droplimb(1) //Robot limbs just kinda fail at full damage.
else
//List organs we can pass it to
@@ -165,6 +165,10 @@
if(status & ORGAN_ROBOT && !robo_repair)
return
// Can't fix peglegs.
if(status & ORGAN_PEG)
return
//Heal damage on the individual wounds
for(var/datum/wound/W in wounds)
if(brute == 0 && burn == 0)
@@ -222,7 +226,7 @@
//Possibly trigger an internal wound, too.
var/local_damage = brute_dam + burn_dam + damage
if(damage > 10 && type != BURN && local_damage > 20 && prob(damage) && !(status & ORGAN_ROBOT))
if(damage > 10 && type != BURN && local_damage > 20 && prob(damage) && !(status & (ORGAN_ROBOT|ORGAN_PEG)))
var/datum/wound/internal_bleeding/I = new (15)
wounds += I
owner.custom_pain("You feel something rip in your [display_name]!", 1)
@@ -266,7 +270,7 @@
return
//Bone fracurtes
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & (ORGAN_ROBOT|ORGAN_PEG)))
src.fracture()
if(!(status & ORGAN_BROKEN))
perma_injury = 0
@@ -281,6 +285,10 @@
#define GANGREN_LEVEL_TERMINAL 2500
#define GERM_TRANSFER_AMOUNT germ_level/500
/datum/organ/external/proc/update_germs()
if(status & (ORGAN_ROBOT|ORGAN_PEG)) //how does robot limb have da germs?
if(germ_level > 0)
germ_level = 0
return
if(germ_level > 0 && owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
//Syncing germ levels with external wounds
for(var/datum/wound/W in wounds)
@@ -305,17 +313,17 @@
if (prob(10)) //Spreading the fun
if (children) //To child organs
for (var/datum/organ/external/child in children)
if (!(child.status & (ORGAN_DEAD|ORGAN_DESTROYED|ORGAN_ROBOT)))
if (!(child.status & (ORGAN_DEAD|ORGAN_DESTROYED|ORGAN_ROBOT|ORGAN_PEG)))
child.germ_level += round(GERM_TRANSFER_AMOUNT)
if (parent)
if (!(parent.status & (ORGAN_DEAD|ORGAN_DESTROYED|ORGAN_ROBOT)))
if (!(parent.status & (ORGAN_DEAD|ORGAN_DESTROYED|ORGAN_ROBOT|ORGAN_PEG)))
parent.germ_level += round(GERM_TRANSFER_AMOUNT)
//Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections
//Updating wounds. Handles wound natural healing, internal bleedings and infections
/datum/organ/external/proc/update_wounds()
if((status & ORGAN_ROBOT)) //Robotic limbs don't heal or get worse.
if((status & (ORGAN_ROBOT|ORGAN_PEG))) //Robotic limbs don't heal or get worse.
return
for(var/datum/wound/W in wounds)
@@ -371,7 +379,7 @@
else if(W.damage_type == BURN)
burn_dam += W.damage
if(!(status & ORGAN_ROBOT) && W.bleeding())
if(!(status & (ORGAN_ROBOT|ORGAN_PEG)) && W.bleeding())
W.bleed_timer--
status |= ORGAN_BLEEDING
@@ -474,11 +482,23 @@
if(LEG_RIGHT)
if(status & ORGAN_ROBOT)
organ = new /obj/item/robot_parts/r_leg(owner.loc)
else if(status & ORGAN_PEG)
//organ = new /obj/item/stack/sheet/wood(owner.loc)
owner.visible_message(\
"\red \The [owner]'s [display_name] snaps!",\
"\red <b>Your [display_name] snaps!</b>",\
"You hear wood being split.")
else
organ= new /obj/item/weapon/organ/r_leg(owner.loc, owner)
if(LEG_LEFT)
if(status & ORGAN_ROBOT)
organ = new /obj/item/robot_parts/l_leg(owner.loc)
else if(status & ORGAN_PEG)
//organ = new /obj/item/stack/sheet/wood(owner.loc)
owner.visible_message(\
"\red \The [owner]'s [display_name] snaps!",\
"\red <b>Your [display_name] snaps!</b>",\
"You hear wood being split.")
else
organ= new /obj/item/weapon/organ/l_leg(owner.loc, owner)
if(HAND_RIGHT)
@@ -567,11 +587,24 @@
src.status &= ~ORGAN_SPLINTED
src.status &= ~ORGAN_ATTACHABLE
src.status &= ~ORGAN_DESTROYED
src.status &= ~ORGAN_PEG
src.status |= ORGAN_ROBOT
for (var/datum/organ/external/T in children)
if(T)
T.robotize()
/datum/organ/external/proc/peggify()
src.status &= ~ORGAN_BROKEN
src.status &= ~ORGAN_BLEEDING
src.status &= ~ORGAN_SPLINTED
src.status &= ~ORGAN_ATTACHABLE
src.status &= ~ORGAN_DESTROYED
src.status &= ~ORGAN_ROBOT
src.status |= ORGAN_PEG
for (var/datum/organ/external/T in children)
if(T)
T.droplimb(1,1)
/datum/organ/external/proc/mutate()
src.status |= ORGAN_MUTATED
owner.update_body()
@@ -597,11 +630,12 @@
if(isFat && has_fat)
fat="_fat"
var/icon_state="[icon_name][gender][fat]"
//testing("[src].get_icon('[gender]', '[fat]') = /icon([owner.race_icon], [icon_state])")
var/baseicon=owner.race_icon
if (status & ORGAN_MUTATED)
return new /icon(owner.deform_icon, icon_state)
else
return new /icon(owner.race_icon, icon_state)
baseicon=owner.deform_icon
if (status & ORGAN_PEG)
baseicon='icons/mob/human_races/o_peg.dmi'
return new /icon(baseicon, icon_state)
/datum/organ/external/proc/is_usable()
@@ -708,13 +742,15 @@
/datum/organ/external/head/get_icon()
if (!owner)
return ..()
return ..()
var/g = "m"
if(owner.gender == FEMALE) g = "f"
var/baseicon=owner.race_icon
if (status & ORGAN_MUTATED)
. = new /icon(owner.deform_icon, "[icon_name]_[g]")
else
. = new /icon(owner.race_icon, "[icon_name]_[g]")
baseicon=owner.deform_icon
if (status & ORGAN_PEG)
baseicon='icons/mob/human_races/o_peg.dmi'
return new /icon(baseicon, "[icon_name]_[g]")
/datum/organ/external/head/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)