Adds defines for organ slots
This commit is contained in:
committed by
CitadelStationBot
parent
be2dc49384
commit
f205911b5a
@@ -127,6 +127,7 @@
|
||||
#define TOXINLOVER 24
|
||||
#define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi)
|
||||
#define NO_UNDERWEAR 26
|
||||
<<<<<<< HEAD
|
||||
#define MUTCOLORS2 27
|
||||
#define MUTCOLORS3 28
|
||||
#define NOLIVER 29
|
||||
@@ -135,3 +136,30 @@
|
||||
#define NOAROUSAL 29 //Stops all arousal effects
|
||||
#define NOGENITALS 30 //Cannot create, use, or otherwise have genitals
|
||||
#define NO_DNA_COPY 31
|
||||
=======
|
||||
#define NOLIVER 27
|
||||
#define NOSTOMACH 28
|
||||
#define NO_DNA_COPY 29
|
||||
|
||||
#define ORGAN_SLOT_BRAIN "brain"
|
||||
#define ORGAN_SLOT_APPENDIX "appendix"
|
||||
#define ORGAN_SLOT_RIGHT_ARM_AUG "r_arm_device"
|
||||
#define ORGAN_SLOT_LEFT_ARM_AUG "l_arm_device"
|
||||
#define ORGAN_SLOT_STOMACH "stomach"
|
||||
#define ORGAN_SLOT_BREATHING_TUBE "breathing_tube"
|
||||
#define ORGAN_SLOT_EARS "ears"
|
||||
#define ORGAN_SLOT_EYES "eye_sight"
|
||||
#define ORGAN_SLOT_LUNGS "lungs"
|
||||
#define ORGAN_SLOT_HEART "heart"
|
||||
#define ORGAN_SLOT_ZOMBIE "zombie_infection"
|
||||
#define ORGAN_SLOT_THRUSTERS "thrusters"
|
||||
#define ORGAN_SLOT_HUD "eye_hud"
|
||||
#define ORGAN_SLOT_LIVER "liver"
|
||||
#define ORGAN_SLOT_TONGUE "tongue"
|
||||
#define ORGAN_SLOT_VOICE "vocal_cords"
|
||||
#define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator"
|
||||
#define ORGAN_SLOT_HEART_AID "heartdrive"
|
||||
#define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop"
|
||||
#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun"
|
||||
#define ORGAN_SLOT_TAIL "tail"
|
||||
>>>>>>> 04c05d8... Adds defines for organ slots (#31737)
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
to_chat(C, "<span class='notice'>You are no longer running on internals.</span>")
|
||||
icon_state = "internal0"
|
||||
else
|
||||
if(!C.getorganslot("breathing_tube"))
|
||||
if(!C.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(!istype(C.wear_mask, /obj/item/clothing/mask))
|
||||
to_chat(C, "<span class='warning'>You are not wearing an internals mask!</span>")
|
||||
return 1
|
||||
|
||||
@@ -49,7 +49,7 @@ Bonus
|
||||
to_chat(M, "<span class='warning'>[pick("You hear a ringing in your ear.", "Your ears pop.")]</span>")
|
||||
if(5)
|
||||
if(power > 2)
|
||||
var/obj/item/organ/ears/ears = M.getorganslot("ears")
|
||||
var/obj/item/organ/ears/ears = M.getorganslot(ORGAN_SLOT_EARS)
|
||||
if(istype(ears) && ears.ear_damage < UNHEALING_EAR_DAMAGE)
|
||||
to_chat(M, "<span class='userdanger'>Your ears pop painfully and start bleeding!</span>")
|
||||
ears.ear_damage = max(ears.ear_damage, UNHEALING_EAR_DAMAGE)
|
||||
|
||||
@@ -44,7 +44,7 @@ Bonus
|
||||
if(!..())
|
||||
return
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(istype(eyes))
|
||||
switch(A.stage)
|
||||
if(1, 2)
|
||||
@@ -106,7 +106,7 @@ Bonus
|
||||
if(!..())
|
||||
return
|
||||
var/mob/living/M = A.affected_mob
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
switch(A.stage)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
var/datum/changelingprofile/prof = mind.changeling.add_new_profile(C, src)
|
||||
mind.changeling.first_prof = prof
|
||||
|
||||
var/obj/item/organ/brain/B = C.getorganslot("brain")
|
||||
var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
B.vital = FALSE
|
||||
B.decoy_override = TRUE
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
active = FALSE
|
||||
|
||||
/obj/effect/proc_holder/changeling/augmented_eyesight/on_purchase(mob/user) //The ability starts inactive, so we should be protected from flashes.
|
||||
var/obj/item/organ/eyes/E = user.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES)
|
||||
if (E)
|
||||
E.flash_protect = 2 //Adjust the user's eyes' flash protection
|
||||
to_chat(user, "We adjust our eyes to protect them from bright lights.")
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
var/obj/item/organ/eyes/E = user.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(E)
|
||||
if(!active)
|
||||
E.sight_flags |= SEE_MOBS | SEE_OBJS | SEE_TURFS //Add sight flags to the user's eyes
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
/obj/effect/proc_holder/changeling/augmented_eyesight/on_refund(mob/user) //Get rid of x-ray vision and flash protection when the user refunds this ability
|
||||
var/obj/item/organ/eyes/E = user.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(E)
|
||||
if (active)
|
||||
E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
C.emote("scream")
|
||||
C.regenerate_limbs(1)
|
||||
C.regenerate_organs()
|
||||
if(!user.getorganslot("brain"))
|
||||
if(!user.getorganslot(ORGAN_SLOT_BRAIN))
|
||||
var/obj/item/organ/brain/changeling_brain/B = new()
|
||||
B.Insert(C)
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
|
||||
|
||||
if(clonemind.changeling)
|
||||
var/obj/item/organ/brain/B = H.getorganslot("brain")
|
||||
var/obj/item/organ/brain/B = H.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
B.vital = FALSE
|
||||
B.decoy_override = TRUE
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
M.adjust_blurriness(3)
|
||||
M.adjust_eye_damage(rand(2,4))
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
if(eyes.eye_damage >= 10)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/obj/item/airlock_painter
|
||||
name = "airlock painter"
|
||||
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob."
|
||||
@@ -124,3 +125,131 @@
|
||||
user.put_in_hands(ink)
|
||||
to_chat(user, "<span class='notice'>You remove [ink] from [src].</span>")
|
||||
ink = null
|
||||
=======
|
||||
/obj/item/airlock_painter
|
||||
name = "airlock painter"
|
||||
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "paint sprayer"
|
||||
item_state = "paint sprayer"
|
||||
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
origin_tech = "engineering=2"
|
||||
|
||||
flags_1 = CONDUCT_1 | NOBLUDGEON_1
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
var/obj/item/device/toner/ink = null
|
||||
|
||||
/obj/item/airlock_painter/New()
|
||||
..()
|
||||
ink = new /obj/item/device/toner(src)
|
||||
|
||||
//This proc doesn't just check if the painter can be used, but also uses it.
|
||||
//Only call this if you are certain that the painter will be used right after this check!
|
||||
/obj/item/airlock_painter/proc/use(mob/user)
|
||||
if(can_use(user))
|
||||
ink.charges--
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//This proc only checks if the painter can be used.
|
||||
//Call this if you don't want the painter to be used right after this check, for example
|
||||
//because you're expecting user input.
|
||||
/obj/item/airlock_painter/proc/can_use(mob/user)
|
||||
if(!ink)
|
||||
to_chat(user, "<span class='notice'>There is no toner cartridge installed in [src]!</span>")
|
||||
return 0
|
||||
else if(ink.charges < 1)
|
||||
to_chat(user, "<span class='notice'>[src] is out of ink!</span>")
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/item/airlock_painter/suicide_act(mob/user)
|
||||
var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
|
||||
if(can_use(user) && L)
|
||||
user.visible_message("<span class='suicide'>[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
use(user)
|
||||
|
||||
// Once you've inhaled the toner, you throw up your lungs
|
||||
// and then die.
|
||||
|
||||
// Find out if there is an open turf in front of us,
|
||||
// and if not, pick the turf we are standing on.
|
||||
var/turf/T = get_step(get_turf(src), user.dir)
|
||||
if(!isopenturf(T))
|
||||
T = get_turf(src)
|
||||
|
||||
// they managed to lose their lungs between then and
|
||||
// now. Good job.
|
||||
if(!L)
|
||||
return OXYLOSS
|
||||
|
||||
L.Remove(user)
|
||||
|
||||
// make some colorful reagent, and apply it to the lungs
|
||||
L.create_reagents(10)
|
||||
L.reagents.add_reagent("colorful_reagent", 10)
|
||||
L.reagents.reaction(L, TOUCH, 1)
|
||||
|
||||
// TODO maybe add some colorful vomit?
|
||||
|
||||
user.visible_message("<span class='suicide'>[user] vomits out their [L]!</span>")
|
||||
playsound(user.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
L.forceMove(T)
|
||||
|
||||
return (TOXLOSS|OXYLOSS)
|
||||
else if(can_use(user) && !L)
|
||||
user.visible_message("<span class='suicide'>[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
user.reagents.add_reagent("colorful_reagent", 1)
|
||||
user.reagents.reaction(user, TOUCH, 1)
|
||||
return TOXLOSS
|
||||
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is trying to inhale toner from [src]! It might be a suicide attempt if [src] had any toner.</span>")
|
||||
return SHAME
|
||||
|
||||
|
||||
/obj/item/airlock_painter/examine(mob/user)
|
||||
..()
|
||||
if(!ink)
|
||||
to_chat(user, "<span class='notice'>It doesn't have a toner cartridge installed.</span>")
|
||||
return
|
||||
var/ink_level = "high"
|
||||
if(ink.charges < 1)
|
||||
ink_level = "empty"
|
||||
else if((ink.charges/ink.max_charges) <= 0.25) //25%
|
||||
ink_level = "low"
|
||||
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
|
||||
ink_level = "dangerously high"
|
||||
to_chat(user, "<span class='notice'>Its ink levels look [ink_level].</span>")
|
||||
|
||||
|
||||
/obj/item/airlock_painter/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/toner))
|
||||
if(ink)
|
||||
to_chat(user, "<span class='notice'>[src] already contains \a [ink].</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You install [W] into [src].</span>")
|
||||
ink = W
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/airlock_painter/attack_self(mob/user)
|
||||
if(ink)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
ink.loc = user.loc
|
||||
user.put_in_hands(ink)
|
||||
to_chat(user, "<span class='notice'>You remove [ink] from [src].</span>")
|
||||
ink = null
|
||||
>>>>>>> 04c05d8... Adds defines for organ slots (#31737)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/organ/eyes/E = M.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/E = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!E)
|
||||
to_chat(user, "<span class='danger'>[M] doesn't have any eyes!</span>")
|
||||
return
|
||||
|
||||
@@ -171,7 +171,7 @@ MASS SPECTROMETER
|
||||
if(advanced)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
var/obj/item/organ/ears/ears = C.getorganslot("ears")
|
||||
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
|
||||
to_chat(user, "\t<span class='info'><b>==EAR STATUS==</b></span>")
|
||||
if(istype(ears))
|
||||
var/healthy = TRUE
|
||||
@@ -189,7 +189,7 @@ MASS SPECTROMETER
|
||||
to_chat(user, "\t<span class='info'>Healthy.</span>")
|
||||
else
|
||||
to_chat(user, "\t<span class='alert'>Subject does not have ears.</span>")
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
|
||||
to_chat(user, "\t<span class='info'><b>==EYE STATUS==</b></span>")
|
||||
if(istype(eyes))
|
||||
var/healthy = TRUE
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
H.internal = null
|
||||
H.update_internals_hud_icon(0)
|
||||
else
|
||||
if(!H.getorganslot("breathing_tube"))
|
||||
if(!H.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(!H.wear_mask)
|
||||
to_chat(H, "<span class='warning'>You need a mask!</span>")
|
||||
return
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
var/heart_strength = "<span class='danger'>no</span>"
|
||||
var/lung_strength = "<span class='danger'>no</span>"
|
||||
|
||||
var/obj/item/organ/heart/heart = M.getorganslot("heart")
|
||||
var/obj/item/organ/lungs/lungs = M.getorganslot("lungs")
|
||||
var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART)
|
||||
var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
|
||||
if(!(M.stat == DEAD || (M.status_flags&FAKEDEATH)))
|
||||
if(heart && istype(heart))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
throw_range = 5
|
||||
layer = ABOVE_MOB_LAYER
|
||||
zone = "head"
|
||||
slot = "brain"
|
||||
slot = ORGAN_SLOT_BRAIN
|
||||
vital = TRUE
|
||||
origin_tech = "biotech=5"
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
@@ -70,7 +70,7 @@
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
if(L.disabilities & NOCLONE)
|
||||
brainmob.disabilities |= NOCLONE //This is so you can't just decapitate a husked guy and clone them without needing to get a new body
|
||||
var/obj/item/organ/zombie_infection/ZI = L.getorganslot("zombie_infection")
|
||||
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
|
||||
if(ZI)
|
||||
brainmob.set_species(ZI.old_species) //For if the brain is cloned
|
||||
if(L.mind && L.mind.current)
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else if(ITEM && istype(ITEM, /obj/item/tank))
|
||||
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot("breathing_tube"))
|
||||
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
internal = ITEM
|
||||
update_internals_hud_icon(1)
|
||||
|
||||
@@ -527,7 +527,7 @@
|
||||
|
||||
sight = initial(sight)
|
||||
lighting_alpha = initial(lighting_alpha)
|
||||
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!E)
|
||||
update_tint()
|
||||
else
|
||||
@@ -584,7 +584,7 @@
|
||||
if(wear_mask)
|
||||
. += wear_mask.tint
|
||||
|
||||
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
|
||||
if(E)
|
||||
. += E.tint
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/obj/item/clothing/mask/MFP = src.wear_mask
|
||||
number += MFP.flash_protect
|
||||
|
||||
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!E)
|
||||
number = INFINITY //Can't get flashed without eyes
|
||||
else
|
||||
@@ -28,7 +28,7 @@
|
||||
number += 1
|
||||
if(head && (head.flags_2 & BANG_PROTECT_2))
|
||||
number += 1
|
||||
var/obj/item/organ/ears/E = getorganslot("ears")
|
||||
var/obj/item/organ/ears/E = getorganslot(ORGAN_SLOT_EARS)
|
||||
if(!E)
|
||||
number = INFINITY
|
||||
else
|
||||
@@ -279,7 +279,7 @@
|
||||
|
||||
var/damage = intensity - get_eye_protection()
|
||||
if(.) // we've been flashed
|
||||
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
if(visual)
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
/mob/living/carbon/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
|
||||
var/ear_safety = get_ear_protection()
|
||||
var/obj/item/organ/ears/ears = getorganslot("ears")
|
||||
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
|
||||
var/effect_amount = intensity - ear_safety
|
||||
if(effect_amount > 0)
|
||||
if(stun_pwr)
|
||||
@@ -363,6 +363,6 @@
|
||||
|
||||
/mob/living/carbon/can_hear()
|
||||
. = FALSE
|
||||
var/obj/item/organ/ears/ears = getorganslot("ears")
|
||||
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
|
||||
if(istype(ears) && !ears.deaf)
|
||||
. = TRUE
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
return 1
|
||||
|
||||
// Do we have a jetpack implant (and is it on)?
|
||||
var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot("thrusters")
|
||||
var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot(ORGAN_SLOT_THRUSTERS)
|
||||
if(istype(T) && movement_dir && T.allow_thrust(0.01))
|
||||
return 1
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
var/obj/item/organ/heart/H = getorganslot("heart")
|
||||
var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART)
|
||||
if(H)
|
||||
H.beat = BEAT_NONE
|
||||
|
||||
|
||||
@@ -270,13 +270,13 @@
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
var/perpname = get_face_name(get_id_name(""))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud))
|
||||
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.general)
|
||||
if(href_list["photo_front"] || href_list["photo_side"])
|
||||
if(R)
|
||||
if(!H.canUseHUD())
|
||||
return
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
return
|
||||
var/obj/item/photo/P = null
|
||||
if(href_list["photo_front"])
|
||||
@@ -287,13 +287,13 @@
|
||||
P.show(H)
|
||||
|
||||
if(href_list["hud"] == "m")
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
if(href_list["p_stat"])
|
||||
var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel")
|
||||
if(R)
|
||||
if(!H.canUseHUD())
|
||||
return
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
return
|
||||
if(health_status && health_status != "Cancel")
|
||||
R.fields["p_stat"] = health_status
|
||||
@@ -303,7 +303,7 @@
|
||||
if(R)
|
||||
if(!H.canUseHUD())
|
||||
return
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
|
||||
return
|
||||
if(health_status && health_status != "Cancel")
|
||||
R.fields["m_stat"] = health_status
|
||||
@@ -352,7 +352,7 @@
|
||||
to_chat(usr, "<span class='danger'>Gathered data is inconsistent with the analysis, possible cause: poisoning.</span>")
|
||||
|
||||
if(href_list["hud"] == "s")
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
if(usr.stat || usr == src) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
|
||||
return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten
|
||||
// Checks the user has security clearence before allowing them to change arrest status via hud, comment out to enable all access
|
||||
@@ -379,7 +379,7 @@
|
||||
if(setcriminal != "Cancel")
|
||||
if(R)
|
||||
if(H.canUseHUD())
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
investigate_log("[src.key] has been set from [R.fields["criminal"]] to [setcriminal] by [usr.name] ([usr.key]).", INVESTIGATE_RECORDS)
|
||||
R.fields["criminal"] = setcriminal
|
||||
sec_hud_set_security_status()
|
||||
@@ -389,7 +389,7 @@
|
||||
if(R)
|
||||
if(!H.canUseHUD())
|
||||
return
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
return
|
||||
to_chat(usr, "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]")
|
||||
to_chat(usr, "<b>Minor Crimes:</b>")
|
||||
@@ -418,7 +418,7 @@
|
||||
return
|
||||
else if(!H.canUseHUD())
|
||||
return
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
return
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
|
||||
GLOB.data_core.addMinorCrime(R.fields["id"], crime)
|
||||
@@ -433,7 +433,7 @@
|
||||
return
|
||||
else if (!H.canUseHUD())
|
||||
return
|
||||
else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
return
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
|
||||
GLOB.data_core.addMajorCrime(R.fields["id"], crime)
|
||||
@@ -444,7 +444,7 @@
|
||||
if(R)
|
||||
if(!H.canUseHUD())
|
||||
return
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
return
|
||||
to_chat(usr, "<b>Comments/Log:</b>")
|
||||
var/counter = 1
|
||||
@@ -462,7 +462,7 @@
|
||||
return
|
||||
else if(!H.canUseHUD())
|
||||
return
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
|
||||
return
|
||||
var/counter = 1
|
||||
while(R.fields[text("com_[]", counter)])
|
||||
@@ -637,7 +637,7 @@
|
||||
return 0
|
||||
|
||||
var/they_breathe = (!(NOBREATH in C.dna.species.species_traits))
|
||||
var/they_lung = C.getorganslot("lungs")
|
||||
var/they_lung = C.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
|
||||
if(C.health > HEALTH_THRESHOLD_CRIT)
|
||||
return
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
siemens_coeff = gloves_siemens_coeff
|
||||
if(undergoing_cardiac_arrest() && !illusion)
|
||||
if(shock_damage * siemens_coeff >= 1 && prob(25))
|
||||
var/obj/item/organ/heart/heart = getorganslot("heart")
|
||||
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
|
||||
heart.beating = TRUE
|
||||
if(stat == CONSCIOUS)
|
||||
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
/mob/living/carbon/human/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
if((C.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || (initial(C.flags_inv) & (HIDEHAIR|HIDEFACIALHAIR)))
|
||||
update_hair()
|
||||
if(toggle_off && internal && !getorganslot("breathing_tube"))
|
||||
if(toggle_off && internal && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
update_internals_hud_icon(0)
|
||||
internal = null
|
||||
if(C.flags_inv & HIDEEYES)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30)
|
||||
/mob/living/carbon/human/check_breath(datum/gas_mixture/breath)
|
||||
|
||||
var/L = getorganslot("lungs")
|
||||
var/L = getorganslot(ORGAN_SLOT_LUNGS)
|
||||
|
||||
if(!L)
|
||||
if(health >= HEALTH_THRESHOLD_CRIT)
|
||||
@@ -328,7 +328,7 @@
|
||||
/mob/living/carbon/human/proc/undergoing_cardiac_arrest()
|
||||
if(!can_heartattack())
|
||||
return FALSE
|
||||
var/obj/item/organ/heart/heart = getorganslot("heart")
|
||||
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
|
||||
if(istype(heart) && heart.beating)
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -337,7 +337,7 @@
|
||||
if(!can_heartattack())
|
||||
return FALSE
|
||||
|
||||
var/obj/item/organ/heart/heart = getorganslot("heart")
|
||||
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
|
||||
if(!istype(heart))
|
||||
return
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
CHECK_DNA_AND_SPECIES(src)
|
||||
|
||||
// how do species that don't breathe talk? magic, that's what.
|
||||
if(!(NOBREATH in dna.species.species_traits) && !getorganslot("lungs"))
|
||||
if(!(NOBREATH in dna.species.species_traits) && !getorganslot(ORGAN_SLOT_LUNGS))
|
||||
return 0
|
||||
if(mind)
|
||||
return !mind.miming
|
||||
|
||||
@@ -124,15 +124,15 @@
|
||||
|
||||
//Will regenerate missing organs
|
||||
/datum/species/proc/regenerate_organs(mob/living/carbon/C,datum/species/old_species,replace_current=TRUE)
|
||||
var/obj/item/organ/brain/brain = C.getorganslot("brain")
|
||||
var/obj/item/organ/heart/heart = C.getorganslot("heart")
|
||||
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
|
||||
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight")
|
||||
var/obj/item/organ/ears/ears = C.getorganslot("ears")
|
||||
var/obj/item/organ/tongue/tongue = C.getorganslot("tongue")
|
||||
var/obj/item/organ/liver/liver = C.getorganslot("liver")
|
||||
var/obj/item/organ/stomach/stomach = C.getorganslot("stomach")
|
||||
var/obj/item/organ/brain/brain = C.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
var/obj/item/organ/heart/heart = C.getorganslot(ORGAN_SLOT_HEART)
|
||||
var/obj/item/organ/lungs/lungs = C.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
var/obj/item/organ/appendix/appendix = C.getorganslot(ORGAN_SLOT_APPENDIX)
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
|
||||
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
|
||||
var/obj/item/organ/tongue/tongue = C.getorganslot(ORGAN_SLOT_TONGUE)
|
||||
var/obj/item/organ/liver/liver = C.getorganslot(ORGAN_SLOT_LIVER)
|
||||
var/obj/item/organ/stomach/stomach = C.getorganslot(ORGAN_SLOT_STOMACH)
|
||||
|
||||
var/should_have_brain = TRUE
|
||||
var/should_have_heart = !(NOBLOOD in species_traits)
|
||||
@@ -1198,7 +1198,7 @@
|
||||
if(!gravity)
|
||||
var/obj/item/tank/jetpack/J = H.back
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = H.wear_suit
|
||||
var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot("thrusters")
|
||||
var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot(ORGAN_SLOT_THRUSTERS)
|
||||
if(!istype(J) && istype(C))
|
||||
J = C.jetpack
|
||||
if(istype(J) && J.full_speed && J.allow_thrust(0.01, H)) //Prevents stacking
|
||||
@@ -1254,7 +1254,7 @@
|
||||
return 1
|
||||
else
|
||||
var/we_breathe = (!(NOBREATH in user.dna.species.species_traits))
|
||||
var/we_lung = user.getorganslot("lungs")
|
||||
var/we_lung = user.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
|
||||
if(we_breathe && we_lung)
|
||||
user.do_cpr(target)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
// Infection organ needs to be handled separately from mutant_organs
|
||||
// because it persists through species transitions
|
||||
var/obj/item/organ/zombie_infection/infection
|
||||
infection = C.getorganslot("zombie_infection")
|
||||
infection = C.getorganslot(ORGAN_SLOT_ZOMBIE)
|
||||
if(!infection)
|
||||
infection = new()
|
||||
infection.Insert(C)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(!getorganslot("breathing_tube"))
|
||||
if(!getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL))
|
||||
losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if((status_flags & GODMODE))
|
||||
return
|
||||
|
||||
var/lungs = getorganslot("lungs")
|
||||
var/lungs = getorganslot(ORGAN_SLOT_LUNGS)
|
||||
if(!lungs)
|
||||
adjustOxyLoss(2)
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
if(internal.loc != src)
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot("breathing_tube"))
|
||||
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else
|
||||
@@ -391,7 +391,7 @@
|
||||
/////////
|
||||
|
||||
/mob/living/carbon/proc/handle_liver()
|
||||
var/obj/item/organ/liver/liver = getorganslot("liver")
|
||||
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
|
||||
if((!dna && !liver) || (NOLIVER in dna.species.species_traits))
|
||||
return
|
||||
if(liver)
|
||||
@@ -404,17 +404,17 @@
|
||||
liver_failure()
|
||||
|
||||
/mob/living/carbon/proc/undergoing_liver_failure()
|
||||
var/obj/item/organ/liver/liver = getorganslot("liver")
|
||||
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(liver && liver.failing)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/return_liver_damage()
|
||||
var/obj/item/organ/liver/liver = getorganslot("liver")
|
||||
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(liver)
|
||||
return liver.damage
|
||||
|
||||
/mob/living/carbon/proc/applyLiverDamage(var/d)
|
||||
var/obj/item/organ/liver/L = getorganslot("liver")
|
||||
var/obj/item/organ/liver/L = getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(L)
|
||||
L.damage += d
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/monkey/IsVocal()
|
||||
if(!getorganslot("lungs"))
|
||||
if(!getorganslot(ORGAN_SLOT_LUNGS))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/carbon/treat_message(message)
|
||||
message = ..(message)
|
||||
var/obj/item/organ/tongue/T = getorganslot("tongue")
|
||||
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(!T) //hoooooouaah!
|
||||
var/regex/tongueless_lower = new("\[gdntke]+", "g")
|
||||
var/regex/tongueless_upper = new("\[GDNTKE]+", "g")
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/mob/living/carbon/get_spans()
|
||||
. = ..()
|
||||
var/obj/item/organ/tongue/T = getorganslot("tongue")
|
||||
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(T)
|
||||
. |= T.get_spans()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
. |= I.get_held_item_speechspans(src)
|
||||
|
||||
/mob/living/carbon/could_speak_in_language(datum/language/dt)
|
||||
var/obj/item/organ/tongue/T = getorganslot("tongue")
|
||||
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(T)
|
||||
. = T.could_speak_in_language(dt)
|
||||
else
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability.
|
||||
|
||||
/mob/living/carbon/damage_eyes(amount)
|
||||
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
if(amount>0)
|
||||
@@ -15,7 +15,7 @@
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/mob/living/carbon/set_eye_damage(amount)
|
||||
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
eyes.eye_damage = max(amount,0)
|
||||
@@ -28,7 +28,7 @@
|
||||
clear_fullscreen("eye_damage")
|
||||
|
||||
/mob/living/carbon/adjust_eye_damage(amount)
|
||||
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
|
||||
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
eyes.eye_damage = max(eyes.eye_damage+amount, 0)
|
||||
|
||||
@@ -362,7 +362,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
if(message_mode == MODE_VOCALCORDS)
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
var/obj/item/organ/vocal_cords/V = C.getorganslot("vocal_cords")
|
||||
var/obj/item/organ/vocal_cords/V = C.getorganslot(ORGAN_SLOT_VOICE)
|
||||
if(V && V.can_speak_with())
|
||||
V.handle_speech(message) //message
|
||||
V.speak_with(message) //action
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
return DEFAULT_TASTE_SENSITIVITY
|
||||
|
||||
/mob/living/carbon/get_taste_sensitivity()
|
||||
var/obj/item/organ/tongue/tongue = getorganslot("tongue")
|
||||
var/obj/item/organ/tongue/tongue = getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(istype(tongue))
|
||||
. = tongue.taste_sensitivity
|
||||
else
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
#define BRAINS_BLOWN_THROW_RANGE 3
|
||||
#define BRAINS_BLOWN_THROW_SPEED 1
|
||||
/obj/item/gun/ballistic/suicide_act(mob/user)
|
||||
var/obj/item/organ/brain/B = user.getorganslot("brain")
|
||||
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if (B && chambered && chambered.BB && can_trigger_gun(user) && !chambered.BB.nodamage)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
sleep(25)
|
||||
|
||||
@@ -38,7 +38,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER)
|
||||
H.drunkenness = max((H.drunkenness + (sqrt(volume) * boozepwr * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
|
||||
var/obj/item/organ/liver/L = H.getorganslot("liver")
|
||||
var/obj/item/organ/liver/L = H.getorganslot(ORGAN_SLOT_LIVER)
|
||||
H.applyLiverDamage((max(sqrt(volume) * boozepwr * L.alcohol_tolerance, 0))/10)
|
||||
return ..() || .
|
||||
|
||||
|
||||
@@ -550,7 +550,7 @@
|
||||
if(!M.is_mouth_covered() && !M.is_eyes_covered())
|
||||
unprotected = TRUE
|
||||
if(unprotected)
|
||||
if(!M.getorganslot("eye_sight")) //can't blind somebody with no eyes
|
||||
if(!M.getorganslot(ORGAN_SLOT_EYES)) //can't blind somebody with no eyes
|
||||
to_chat(M, "<span class = 'notice'>Your eye sockets feel wet.</span>")
|
||||
else
|
||||
if(!M.eye_blurry)
|
||||
|
||||
@@ -671,7 +671,11 @@
|
||||
taste_description = "dull toxin"
|
||||
|
||||
/datum/reagent/medicine/oculine/on_mob_life(mob/living/M)
|
||||
<<<<<<< HEAD
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot("eyes_sight")
|
||||
=======
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
>>>>>>> 04c05d8... Adds defines for organ slots (#31737)
|
||||
if (!eyes)
|
||||
return
|
||||
if(M.disabilities & BLIND)
|
||||
|
||||
@@ -1568,7 +1568,7 @@
|
||||
|
||||
/datum/reagent/romerol/on_mob_life(mob/living/carbon/human/H)
|
||||
// Silently add the zombie infection organ to be activated upon death
|
||||
if(!H.getorganslot("zombie_infection"))
|
||||
if(!H.getorganslot(ORGAN_SLOT_ZOMBIE))
|
||||
var/obj/item/organ/zombie_infection/ZI = new()
|
||||
ZI.Insert(H)
|
||||
..()
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
if(VAULT_TOXIN)
|
||||
to_chat(H, "<span class='notice'>You feel resistant to airborne toxins.</span>")
|
||||
if(locate(/obj/item/organ/lungs) in H.internal_organs)
|
||||
var/obj/item/organ/lungs/L = H.internal_organs_slot["lungs"]
|
||||
var/obj/item/organ/lungs/L = H.internal_organs_slot[ORGAN_SLOT_LUNGS]
|
||||
L.tox_breath_dam_min = 0
|
||||
L.tox_breath_dam_max = 0
|
||||
S.species_traits |= VIRUSIMMUNE
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/datum/surgery/eye_surgery
|
||||
name = "eye surgery"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close)
|
||||
@@ -35,4 +36,43 @@
|
||||
target.adjustBrainLoss(100)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.</span>", "<span class='warning'>You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.</span>")
|
||||
=======
|
||||
/datum/surgery/eye_surgery
|
||||
name = "eye surgery"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close)
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list("eyes")
|
||||
requires_bodypart_type = 0
|
||||
|
||||
//fix eyes
|
||||
/datum/surgery_step/fix_eyes
|
||||
name = "fix eyes"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 45, /obj/item/pen = 25)
|
||||
time = 64
|
||||
|
||||
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
|
||||
var/obj/item/organ/eyes/E = target.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(!E)
|
||||
to_chat(user, "It's hard to do surgery on someones eyes when they don't have any.")
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to fix [target]'s eyes.", "<span class='notice'>You begin to fix [target]'s eyes...</span>")
|
||||
|
||||
/datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] successfully fixes [target]'s eyes!", "<span class='notice'>You succeed in fixing [target]'s eyes.</span>")
|
||||
target.cure_blind()
|
||||
target.set_blindness(0)
|
||||
target.cure_nearsighted()
|
||||
target.blur_eyes(35) //this will fix itself slowly.
|
||||
target.set_eye_damage(0)
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(target.getorgan(/obj/item/organ/brain))
|
||||
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain!</span>", "<span class='warning'>You accidentally stab [target] right in the brain!</span>")
|
||||
target.adjustBrainLoss(100)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.</span>", "<span class='warning'>You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.</span>")
|
||||
>>>>>>> 04c05d8... Adds defines for organ slots (#31737)
|
||||
return FALSE
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
zone = "groin"
|
||||
slot = "appendix"
|
||||
slot = ORGAN_SLOT_APPENDIX
|
||||
var/inflamed = 0
|
||||
|
||||
/obj/item/organ/appendix/update_icon()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "arm-mounted implant"
|
||||
desc = "You shouldn't see this! Adminhelp and report this as an issue on github!"
|
||||
zone = "r_arm"
|
||||
slot = "r_arm_device"
|
||||
icon_state = "implant-toolkit"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
@@ -20,9 +19,18 @@
|
||||
holder = new holder(src)
|
||||
|
||||
update_icon()
|
||||
slot = zone + "_device"
|
||||
SetSlotFromZone()
|
||||
items_list = contents.Copy()
|
||||
|
||||
/obj/item/organ/cyberimp/arm/proc/SetSlotFromZone()
|
||||
switch(zone)
|
||||
if("l_arm")
|
||||
slot = ORGAN_SLOT_LEFT_ARM_AUG
|
||||
if("r_arm")
|
||||
slot = ORGAN_SLOT_RIGHT_ARM_AUG
|
||||
else
|
||||
CRASH("Invalid zone for [type]")
|
||||
|
||||
/obj/item/organ/cyberimp/arm/update_icon()
|
||||
if(zone == "r_arm")
|
||||
transform = null
|
||||
@@ -40,7 +48,7 @@
|
||||
zone = "l_arm"
|
||||
else
|
||||
zone = "r_arm"
|
||||
slot = zone + "_device"
|
||||
SetSlotFromZone()
|
||||
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/card/emag))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/hunger_threshold = NUTRITION_LEVEL_STARVING
|
||||
var/synthesizing = 0
|
||||
var/poison_amount = 5
|
||||
slot = "stomach"
|
||||
slot = ORGAN_SLOT_STOMACH
|
||||
origin_tech = "materials=2;powerstorage=2;biotech=2"
|
||||
|
||||
/obj/item/organ/cyberimp/chest/nutriment/on_life()
|
||||
@@ -51,7 +51,7 @@
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#AD0000"
|
||||
origin_tech = "materials=5;programming=4;biotech=4"
|
||||
slot = "heartdrive"
|
||||
slot = ORGAN_SLOT_HEART_AID
|
||||
var/revive_cost = 0
|
||||
var/reviving = 0
|
||||
var/cooldown = 0
|
||||
@@ -120,7 +120,7 @@
|
||||
name = "implantable thrusters set"
|
||||
desc = "An implantable set of thruster ports. They use the gas from environment or subject's internals for propulsion in zero-gravity areas. \
|
||||
Unlike regular jetpack, this device has no stabilization system."
|
||||
slot = "thrusters"
|
||||
slot = ORGAN_SLOT_THRUSTERS
|
||||
icon_state = "imp_jetpack"
|
||||
origin_tech = "materials=4;magnets=4;biotech=4;engineering=5"
|
||||
implant_overlay = null
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "artificial photoreceptors with specialized functionality"
|
||||
icon_state = "eye_implant"
|
||||
implant_overlay = "eye_implant_overlay"
|
||||
slot = "eye_sight"
|
||||
slot = ORGAN_SLOT_EYES
|
||||
zone = "eyes"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/organ/cyberimp/eyes/hud
|
||||
name = "HUD implant"
|
||||
desc = "These cybernetic eyes will display a HUD over everything you see. Maybe."
|
||||
slot = "eye_hud"
|
||||
slot = ORGAN_SLOT_HUD
|
||||
var/HUD_type = 0
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/hud/Insert(var/mob/living/carbon/M, var/special = 0, drop_if_replaced = FALSE)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var/active = 0
|
||||
var/list/stored_items = list()
|
||||
implant_color = "#DE7E00"
|
||||
slot = "brain_antidrop"
|
||||
slot = ORGAN_SLOT_BRAIN_ANTIDROP
|
||||
origin_tech = "materials=4;programming=5;biotech=4"
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
name = "CNS Rebooter implant"
|
||||
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned."
|
||||
implant_color = "#FFFF00"
|
||||
slot = "brain_antistun"
|
||||
slot = ORGAN_SLOT_BRAIN_ANTISTUN
|
||||
origin_tech = "materials=5;programming=4;biotech=5"
|
||||
|
||||
/obj/item/organ/cyberimp/brain/anti_stun/on_life()
|
||||
@@ -133,7 +133,7 @@
|
||||
name = "breathing tube implant"
|
||||
desc = "This simple implant adds an internals connector to your back, allowing you to use internals without a mask and protecting you from being choked."
|
||||
icon_state = "implant_mask"
|
||||
slot = "breathing_tube"
|
||||
slot = ORGAN_SLOT_BREATHING_TUBE
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "ears"
|
||||
desc = "There are three parts to the ear. Inner, middle and outer. Only one of these parts should be normally visible."
|
||||
zone = "head"
|
||||
slot = "ears"
|
||||
slot = ORGAN_SLOT_EARS
|
||||
gender = PLURAL
|
||||
|
||||
// `deaf` measures "ticks" of deafness. While > 0, the person is unable
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "eyeballs"
|
||||
desc = "I see you!"
|
||||
zone = "eyes"
|
||||
slot = "eye_sight"
|
||||
slot = ORGAN_SLOT_EYES
|
||||
gender = PLURAL
|
||||
|
||||
var/sight_flags = 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "I feel bad for the heartless bastard who lost this."
|
||||
icon_state = "heart-on"
|
||||
zone = "chest"
|
||||
slot = "heart"
|
||||
slot = ORGAN_SLOT_HEART
|
||||
origin_tech = "biotech=5"
|
||||
// Heart attack code is in code/modules/mob/living/carbon/human/life.dm
|
||||
var/beating = 1
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
origin_tech = "biotech=3"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
zone = "chest"
|
||||
slot = "liver"
|
||||
slot = ORGAN_SLOT_LIVER
|
||||
desc = "Pairing suggestion: chianti and fava beans."
|
||||
var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure
|
||||
var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
name = "lungs"
|
||||
icon_state = "lungs"
|
||||
zone = "chest"
|
||||
slot = "lungs"
|
||||
slot = ORGAN_SLOT_LUNGS
|
||||
gender = PLURAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
var/has_liver = (!(NOLIVER in dna.species.species_traits))
|
||||
var/has_stomach = (!(NOSTOMACH in dna.species.species_traits))
|
||||
|
||||
if(has_liver && !getorganslot("liver"))
|
||||
if(has_liver && !getorganslot(ORGAN_SLOT_LIVER))
|
||||
var/obj/item/organ/liver/LI
|
||||
|
||||
if(dna.species.mutantliver)
|
||||
@@ -127,7 +127,7 @@
|
||||
LI = new()
|
||||
LI.Insert(src)
|
||||
|
||||
if(has_stomach && !getorganslot("stomach"))
|
||||
if(has_stomach && !getorganslot(ORGAN_SLOT_STOMACH))
|
||||
var/obj/item/organ/stomach/S
|
||||
|
||||
if(dna.species.mutantstomach)
|
||||
@@ -136,15 +136,15 @@
|
||||
S = new()
|
||||
S.Insert(src)
|
||||
|
||||
if(breathes && !getorganslot("lungs"))
|
||||
if(breathes && !getorganslot(ORGAN_SLOT_LUNGS))
|
||||
var/obj/item/organ/lungs/L = new()
|
||||
L.Insert(src)
|
||||
|
||||
if(blooded && !getorganslot("heart"))
|
||||
if(blooded && !getorganslot(ORGAN_SLOT_HEART))
|
||||
var/obj/item/organ/heart/H = new()
|
||||
H.Insert(src)
|
||||
|
||||
if(!getorganslot("tongue"))
|
||||
if(!getorganslot(ORGAN_SLOT_TONGUE))
|
||||
var/obj/item/organ/tongue/T
|
||||
|
||||
if(dna && dna.species && dna.species.mutanttongue)
|
||||
@@ -155,7 +155,7 @@
|
||||
// if they have no mutant tongues, give them a regular one
|
||||
T.Insert(src)
|
||||
|
||||
if(!getorganslot("eye_sight"))
|
||||
if(!getorganslot(ORGAN_SLOT_EYES))
|
||||
var/obj/item/organ/eyes/E
|
||||
|
||||
if(dna && dna.species && dna.species.mutanteyes)
|
||||
@@ -165,7 +165,7 @@
|
||||
E = new()
|
||||
E.Insert(src)
|
||||
|
||||
if(!getorganslot("ears"))
|
||||
if(!getorganslot(ORGAN_SLOT_EARS))
|
||||
var/obj/item/organ/ears/ears
|
||||
if(dna && dna.species && dna.species.mutantears)
|
||||
ears = new dna.species.mutantears
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
origin_tech = "biotech=4"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
zone = "chest"
|
||||
slot = "stomach"
|
||||
slot = ORGAN_SLOT_STOMACH
|
||||
attack_verb = list("gored", "squished", "slapped", "digested")
|
||||
desc = "Onaka ga suite imasu."
|
||||
var/disgust_metabolism = 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "tail"
|
||||
desc = "What did you cut this off of?"
|
||||
zone = "groin"
|
||||
slot = "tail"
|
||||
slot = ORGAN_SLOT_TAIL
|
||||
|
||||
/obj/item/organ/tail/cat
|
||||
name = "cat tail"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A fleshy muscle mostly used for lying."
|
||||
icon_state = "tonguenormal"
|
||||
zone = "mouth"
|
||||
slot = "tongue"
|
||||
slot = ORGAN_SLOT_TONGUE
|
||||
attack_verb = list("licked", "slobbered", "slapped", "frenched", "tongued")
|
||||
var/list/languages_possible
|
||||
var/say_mod = null
|
||||
@@ -82,7 +82,7 @@
|
||||
var/mob/living/carbon/human/user = usr
|
||||
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
var/obj/item/organ/tongue/T = H.getorganslot("tongue")
|
||||
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(!T || T.type != type)
|
||||
continue
|
||||
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
name = "vocal cords"
|
||||
icon_state = "appendix"
|
||||
zone = "mouth"
|
||||
slot = "vocal_cords"
|
||||
slot = ORGAN_SLOT_VOICE
|
||||
gender = PLURAL
|
||||
var/list/spans = null
|
||||
|
||||
@@ -24,15 +24,13 @@
|
||||
name = "adamantine resonator"
|
||||
desc = "Fragments of adamantine exists in all golems, stemming from their origins as purely magical constructs. These are used to \"hear\" messages from their leaders."
|
||||
zone = "head"
|
||||
slot = "adamantine_resonator"
|
||||
slot = ORGAN_SLOT_ADAMANTINE_RESONATOR
|
||||
icon_state = "adamantine_resonator"
|
||||
|
||||
/obj/item/organ/vocal_cords/adamantine
|
||||
name = "adamantine vocal cords"
|
||||
desc = "When adamantine resonates, it causes all nearby pieces of adamantine to resonate as well. Adamantine golems use this to broadcast messages to nearby golems."
|
||||
actions_types = list(/datum/action/item_action/organ_action/use/adamantine_vocal_cords)
|
||||
zone = "mouth"
|
||||
slot = "vocal_cords"
|
||||
icon_state = "adamantine_cords"
|
||||
|
||||
/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger()
|
||||
@@ -48,7 +46,7 @@
|
||||
for(var/m in GLOB.player_list)
|
||||
if(iscarbon(m))
|
||||
var/mob/living/carbon/C = m
|
||||
if(C.getorganslot("adamantine_resonator"))
|
||||
if(C.getorganslot(ORGAN_SLOT_ADAMANTINE_RESONATOR))
|
||||
to_chat(C, msg)
|
||||
if(isobserver(m))
|
||||
var/link = FOLLOW_LINK(m, owner)
|
||||
@@ -59,8 +57,6 @@
|
||||
name = "divine vocal cords"
|
||||
desc = "They carry the voice of an ancient god."
|
||||
icon_state = "voice_of_god"
|
||||
zone = "mouth"
|
||||
slot = "vocal_cords"
|
||||
actions_types = list(/datum/action/item_action/organ_action/colossus)
|
||||
var/next_command = 0
|
||||
var/cooldown_mod = 1
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/organ/zombie_infection/infection
|
||||
infection = target.getorganslot("zombie_infection")
|
||||
infection = target.getorganslot(ORGAN_SLOT_ZOMBIE)
|
||||
if(!infection)
|
||||
infection = new()
|
||||
infection.Insert(target)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "festering ooze"
|
||||
desc = "A black web of pus and viscera."
|
||||
zone = "head"
|
||||
slot = "zombie_infection"
|
||||
slot = ORGAN_SLOT_ZOMBIE
|
||||
icon_state = "blacktumor"
|
||||
origin_tech = "biotech=5"
|
||||
var/datum/species/old_species = /datum/species/human
|
||||
|
||||
Reference in New Issue
Block a user