Merge remote-tracking branch 'refs/remotes/origin/master' into syntheticbloods
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
if(!target.mind)
|
||||
user.visible_message("[target] doesn't respond to the brainwashing, as if [target.p_they()] lacked a mind...")
|
||||
return FALSE
|
||||
if(target.has_trait(TRAIT_MINDSHIELD))
|
||||
if(HAS_TRAIT(target, TRAIT_MINDSHIELD))
|
||||
user.visible_message("You hear a faint buzzing from a device inside [target]'s brain, and the brainwashing is erased.")
|
||||
return FALSE
|
||||
user.visible_message("[user] successfully brainwashes [target]!", "<span class='notice'>You succeed in brainwashing [target].</span>")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return FALSE
|
||||
if(target.stat != DEAD)
|
||||
return FALSE
|
||||
if(target.suiciding || target.has_trait(TRAIT_NOCLONE) || target.hellbound)
|
||||
if(target.suiciding || HAS_TRAIT(target, TRAIT_NOCLONE) || target.hellbound)
|
||||
return FALSE
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/held_index = 0 //are we a hand? if so, which one!
|
||||
var/is_pseudopart = FALSE //For limbs that don't really exist, eg chainsaws
|
||||
|
||||
var/disabled = FALSE //If TRUE, limb is as good as missing
|
||||
var/disabled = BODYPART_NOT_DISABLED //If disabled, limb is as good as missing
|
||||
var/body_damage_coeff = 1 //Multiplier of the limb's damage that gets applied to the mob
|
||||
var/stam_damage_coeff = 0.5
|
||||
var/brutestate = 0
|
||||
@@ -48,7 +48,7 @@
|
||||
var/body_markings = "" //for bodypart markings
|
||||
var/body_markings_icon = 'modular_citadel/icons/mob/mam_markings.dmi'
|
||||
var/list/markings_color = list()
|
||||
var/auxmarking
|
||||
var/auxmarking = ""
|
||||
var/list/auxmarking_color = list()
|
||||
|
||||
var/animal_origin = null //for nonhuman bodypart (e.g. monkey)
|
||||
@@ -88,7 +88,7 @@
|
||||
/obj/item/bodypart/attack(mob/living/carbon/C, mob/user)
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(C.has_trait(TRAIT_LIMBATTACHMENT))
|
||||
if(HAS_TRAIT(C, TRAIT_LIMBATTACHMENT))
|
||||
if(!H.get_bodypart(body_zone) && !animal_origin)
|
||||
if(H == user)
|
||||
H.visible_message("<span class='warning'>[H] jams [src] into [H.p_their()] empty socket!</span>",\
|
||||
@@ -189,7 +189,7 @@
|
||||
if(stamina > DAMAGE_PRECISION)
|
||||
owner.update_stamina()
|
||||
consider_processing()
|
||||
check_disabled()
|
||||
update_disabled()
|
||||
return update_bodypart_damage_state()
|
||||
|
||||
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
|
||||
@@ -209,7 +209,7 @@
|
||||
if(owner && updating_health)
|
||||
owner.updatehealth()
|
||||
consider_processing()
|
||||
check_disabled()
|
||||
update_disabled()
|
||||
return update_bodypart_damage_state()
|
||||
|
||||
//Returns total damage.
|
||||
@@ -220,15 +220,33 @@
|
||||
return total
|
||||
|
||||
//Checks disabled status thresholds
|
||||
/obj/item/bodypart/proc/check_disabled()
|
||||
if(!can_dismember() || owner.has_trait(TRAIT_NODISMEMBER))
|
||||
|
||||
//Checks disabled status thresholds
|
||||
/obj/item/bodypart/proc/update_disabled()
|
||||
set_disabled(is_disabled())
|
||||
|
||||
/obj/item/bodypart/proc/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER))
|
||||
. = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled
|
||||
if((get_damage(TRUE) >= max_damage))
|
||||
return BODYPART_DISABLED_DAMAGE
|
||||
if(disabled && (get_damage(TRUE) <= (max_damage * 0.5)))
|
||||
return BODYPART_NOT_DISABLED
|
||||
else
|
||||
return BODYPART_NOT_DISABLED
|
||||
|
||||
/obj/item/bodypart/proc/check_disabled() //This might be depreciated and should be safe to remove.
|
||||
if(!can_dismember() || HAS_TRAIT(owner, TRAIT_NODISMEMBER))
|
||||
return
|
||||
if(!disabled && (get_damage(TRUE) >= max_damage))
|
||||
set_disabled(TRUE)
|
||||
else if(disabled && (get_damage(TRUE) <= (max_damage * 0.5)))
|
||||
set_disabled(FALSE)
|
||||
|
||||
/obj/item/bodypart/proc/set_disabled(new_disabled = TRUE)
|
||||
|
||||
/obj/item/bodypart/proc/set_disabled(new_disabled)
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
disabled = new_disabled
|
||||
@@ -261,7 +279,6 @@
|
||||
icon = DEFAULT_BODYPART_ICON_ORGANIC
|
||||
else if(status == BODYPART_ROBOTIC)
|
||||
icon = DEFAULT_BODYPART_ICON_ROBOTIC
|
||||
body_markings = null
|
||||
|
||||
if(owner)
|
||||
owner.updatehealth()
|
||||
@@ -285,13 +302,14 @@
|
||||
C = owner
|
||||
no_update = FALSE
|
||||
|
||||
if(C.has_trait(TRAIT_HUSK) && is_organic_limb())
|
||||
if(HAS_TRAIT(C, TRAIT_HUSK) && is_organic_limb())
|
||||
species_id = "husk" //overrides species_id
|
||||
dmg_overlay_type = "" //no damage overlay shown when husked
|
||||
should_draw_gender = FALSE
|
||||
should_draw_greyscale = FALSE
|
||||
no_update = TRUE
|
||||
body_markings = "husk" // reeee
|
||||
auxmarking = "husk"
|
||||
|
||||
if(no_update)
|
||||
return
|
||||
@@ -336,17 +354,18 @@
|
||||
if("mam_body_markings" in S.default_features)
|
||||
var/datum/sprite_accessory/Smark
|
||||
Smark = GLOB.mam_body_markings_list[H.dna.features["mam_body_markings"]]
|
||||
body_markings_icon = Smark.icon
|
||||
if(H.dna.features.["mam_body_markings"] != "None")
|
||||
body_markings_icon = Smark.icon
|
||||
body_markings = lowertext(H.dna.features.["mam_body_markings"])
|
||||
if(MATRIXED)
|
||||
markings_color = list(colorlist)
|
||||
auxmarking = lowertext(H.dna.features.["mam_body_markings"])
|
||||
else
|
||||
body_markings = "plain"
|
||||
markings_color = (H.dna.features.["mcolor"])
|
||||
auxmarking = "plain"
|
||||
markings_color = list(colorlist)
|
||||
|
||||
else
|
||||
body_markings = null
|
||||
markings_color = ""
|
||||
auxmarking = null
|
||||
|
||||
if(!dropping_limb && H.dna.check_mutation(HULK))
|
||||
mutation_color = "00aa00"
|
||||
@@ -361,6 +380,7 @@
|
||||
if(status == BODYPART_ROBOTIC)
|
||||
dmg_overlay_type = "robotic"
|
||||
body_markings = null
|
||||
auxmarking = null
|
||||
|
||||
if(dropping_limb)
|
||||
no_update = TRUE //when attached, the limb won't be affected by the appearance changes of its mob owner.
|
||||
@@ -394,7 +414,8 @@
|
||||
. += image('icons/mob/dam_mob.dmi', "[dmg_overlay_type]_[body_zone]_[brutestate]0", -DAMAGE_LAYER, image_dir)
|
||||
if(burnstate)
|
||||
. += image('icons/mob/dam_mob.dmi', "[dmg_overlay_type]_[body_zone]_0[burnstate]", -DAMAGE_LAYER, image_dir)
|
||||
if(body_markings && status != BODYPART_ROBOTIC)
|
||||
|
||||
if(!isnull(body_markings) && status == BODYPART_ORGANIC)
|
||||
if(!use_digitigrade)
|
||||
if(BODY_ZONE_CHEST)
|
||||
. += image(body_markings_icon, "[body_markings]_[body_zone]_[icon_gender]", -MARKING_LAYER, image_dir)
|
||||
@@ -450,7 +471,7 @@
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
|
||||
// Body markings
|
||||
if(body_markings)
|
||||
if(!isnull(body_markings))
|
||||
if(species_id == "husk")
|
||||
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else if(species_id == "husk" && use_digitigrade)
|
||||
@@ -470,7 +491,7 @@
|
||||
if(aux_zone)
|
||||
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
|
||||
. += aux
|
||||
if(body_markings)
|
||||
if(!isnull(auxmarking))
|
||||
if(species_id == "husk")
|
||||
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
|
||||
else
|
||||
@@ -483,17 +504,18 @@
|
||||
limb.icon_state = "[body_zone]_[icon_gender]"
|
||||
else
|
||||
limb.icon_state = "[body_zone]"
|
||||
|
||||
if(aux_zone)
|
||||
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
|
||||
aux = image(limb.icon, "[aux_zone]", -aux_layer, image_dir)
|
||||
. += aux
|
||||
if(body_markings)
|
||||
if(!isnull(auxmarking))
|
||||
if(species_id == "husk")
|
||||
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
|
||||
else
|
||||
auxmarking = image(body_markings_icon, "[body_markings]_[aux_zone]", -aux_layer, image_dir)
|
||||
. += auxmarking
|
||||
|
||||
if(body_markings)
|
||||
if(!isnull(body_markings))
|
||||
if(species_id == "husk")
|
||||
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else if(species_id == "husk" && use_digitigrade)
|
||||
@@ -509,17 +531,16 @@
|
||||
. += marking
|
||||
return
|
||||
|
||||
|
||||
if(should_draw_greyscale)
|
||||
var/draw_color = mutation_color || species_color || (skin_tone && skintone2hex(skin_tone))
|
||||
if(draw_color)
|
||||
limb.color = "#[draw_color]"
|
||||
if(aux_zone)
|
||||
aux.color = "#[draw_color]"
|
||||
if(body_markings)
|
||||
if(!isnull(auxmarking))
|
||||
auxmarking.color = list(markings_color)
|
||||
|
||||
if(body_markings)
|
||||
if(!isnull(body_markings))
|
||||
if(species_id == "husk")
|
||||
marking.color = "#141414"
|
||||
else
|
||||
@@ -543,6 +564,11 @@
|
||||
max_stamina_damage = 200
|
||||
var/obj/item/cavity_item
|
||||
|
||||
/obj/item/bodypart/chest/can_dismember(obj/item/I)
|
||||
if(!((owner.stat == DEAD) || owner.InFullCritical()))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/chest/Destroy()
|
||||
if(cavity_item)
|
||||
qdel(cavity_item)
|
||||
@@ -598,13 +624,27 @@
|
||||
px_y = 0
|
||||
stam_heal_tick = 2
|
||||
|
||||
/obj/item/bodypart/l_arm/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/l_arm/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/l_arm/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
if(owner.hud_used)
|
||||
var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
|
||||
if(L)
|
||||
@@ -649,18 +689,33 @@
|
||||
stam_heal_tick = 2
|
||||
max_stamina_damage = 50
|
||||
|
||||
/obj/item/bodypart/r_arm/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/r_arm/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_ARM))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/r_arm/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
if(owner.hud_used)
|
||||
var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
|
||||
if(R)
|
||||
R.update_icon()
|
||||
|
||||
|
||||
/obj/item/bodypart/r_arm/monkey
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
icon_state = "default_monkey_r_arm"
|
||||
@@ -699,11 +754,24 @@
|
||||
var/blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
|
||||
|
||||
/obj/item/bodypart/l_leg/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/l_leg/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/l_leg/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
|
||||
|
||||
/obj/item/bodypart/l_leg/digitigrade
|
||||
name = "left digitigrade leg"
|
||||
@@ -748,11 +816,23 @@
|
||||
var/blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
|
||||
|
||||
/obj/item/bodypart/r_leg/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/r_leg/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/r_leg/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
|
||||
/obj/item/bodypart/r_leg/digitigrade
|
||||
name = "right digitigrade leg"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
return FALSE
|
||||
if(C.status_flags & GODMODE)
|
||||
return FALSE
|
||||
if(C.has_trait(TRAIT_NODISMEMBER))
|
||||
if(HAS_TRAIT(C, TRAIT_NODISMEMBER))
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/affecting = C.get_bodypart(BODY_ZONE_CHEST)
|
||||
@@ -47,7 +47,7 @@
|
||||
var/mob/living/carbon/C = owner
|
||||
if(!dismemberable)
|
||||
return FALSE
|
||||
if(C.has_trait(TRAIT_NODISMEMBER))
|
||||
if(HAS_TRAIT(C, TRAIT_NODISMEMBER))
|
||||
return FALSE
|
||||
. = list()
|
||||
var/organ_spilled = 0
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
C = owner
|
||||
|
||||
real_name = C.real_name
|
||||
if(C.has_trait(TRAIT_HUSK))
|
||||
if(HAS_TRAIT(C, TRAIT_HUSK))
|
||||
real_name = "Unknown"
|
||||
hair_style = "Bald"
|
||||
facial_hair_style = "Shaved"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(tool)
|
||||
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || (tool.item_flags & NODROP) || istype(tool, /obj/item/organ))
|
||||
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || HAS_TRAIT(tool, TRAIT_NODROP) || istype(tool, /obj/item/organ))
|
||||
to_chat(user, "<span class='warning'>You can't seem to fit [tool] in [target]'s [target_zone]!</span>")
|
||||
return 0
|
||||
var/obj/item/electronic_assembly/EA = tool
|
||||
|
||||
@@ -110,22 +110,15 @@
|
||||
return 0.5
|
||||
|
||||
|
||||
/proc/get_location_accessible(mob/M, location)
|
||||
/proc/get_location_accessible(mob/living/M, location)
|
||||
var/covered_locations = 0 //based on body_parts_covered
|
||||
var/face_covered = 0 //based on flags_inv
|
||||
var/eyesmouth_covered = 0 //based on flags_cover
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
for(var/obj/item/clothing/I in list(C.back, C.wear_mask, C.head))
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
for(var/obj/item/I in list(H.wear_suit, H.w_uniform, H.shoes, H.belt, H.gloves, H.glasses, H.ears))
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
for(var/A in M.get_equipped_items())
|
||||
var/obj/item/I = A
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
|
||||
switch(location)
|
||||
if(BODY_ZONE_HEAD)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
|
||||
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target)
|
||||
if(target.has_trait(TRAIT_FAT))
|
||||
if(HAS_TRAIT(target, TRAIT_FAT))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
holder = item
|
||||
|
||||
holder.item_flags |= NODROP
|
||||
ADD_TRAIT(holder, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
holder.resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
holder.slot_flags = null
|
||||
holder.materials = null
|
||||
@@ -129,11 +129,14 @@
|
||||
holder = null
|
||||
if(contents.len == 1)
|
||||
Extend(contents[1])
|
||||
else // TODO: make it similar to borg's storage-like module selection
|
||||
var/obj/item/choise = input("Activate which item?", "Arm Implant", null, null) as null|anything in items_list
|
||||
if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && istype(choise) && (choise in contents))
|
||||
// This monster sanity check is a nice example of how bad input() is.
|
||||
Extend(choise)
|
||||
else
|
||||
var/list/choice_list = list()
|
||||
for(var/obj/item/I in items_list)
|
||||
choice_list[I] = image(I)
|
||||
var/obj/item/choice = show_radial_menu(owner, owner, choice_list)
|
||||
if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && (choice in contents))
|
||||
// This monster sanity check is a nice example of how bad input is.
|
||||
Extend(choice)
|
||||
else
|
||||
Retract()
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/item/organ/cyberimp/chest/reviver
|
||||
name = "Reviver implant"
|
||||
desc = "This implant will attempt to revive you if you lose consciousness. For the faint of heart!"
|
||||
desc = "This implant will attempt to revive and heal you if you lose consciousness. For the faint of heart!"
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#AD0000"
|
||||
slot = ORGAN_SLOT_HEART_AID
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
active = !active
|
||||
if(active)
|
||||
for(var/obj/item/I in owner.held_items)
|
||||
if(!(I.item_flags & NODROP))
|
||||
stored_items += I
|
||||
stored_items += I
|
||||
|
||||
var/list/L = owner.get_empty_held_indexes()
|
||||
if(LAZYLEN(L) == owner.held_items.len)
|
||||
@@ -62,7 +61,7 @@
|
||||
else
|
||||
for(var/obj/item/I in stored_items)
|
||||
to_chat(owner, "<span class='notice'>Your [owner.get_held_index_name(owner.get_held_index_of_item(I))]'s grip tightens.</span>")
|
||||
I.item_flags |= NODROP
|
||||
ADD_TRAIT(I, TRAIT_NODROP, ANTI_DROP_IMPLANT_TRAIT)
|
||||
|
||||
else
|
||||
release_items()
|
||||
@@ -83,10 +82,9 @@
|
||||
to_chat(owner, "<span class='warning'>Your [owner.get_held_index_name(owner.get_held_index_of_item(I))] spasms and throws the [I.name]!</span>")
|
||||
stored_items = list()
|
||||
|
||||
|
||||
/obj/item/organ/cyberimp/brain/anti_drop/proc/release_items()
|
||||
for(var/obj/item/I in stored_items)
|
||||
I.item_flags &= ~NODROP
|
||||
REMOVE_TRAIT(I, TRAIT_NODROP, ANTI_DROP_IMPLANT_TRAIT)
|
||||
stored_items = list()
|
||||
|
||||
|
||||
|
||||
@@ -98,3 +98,28 @@
|
||||
|
||||
/obj/item/autosurgeon/reviver
|
||||
starting_organ = /obj/item/organ/cyberimp/chest/reviver
|
||||
|
||||
/obj/item/autosurgeon/penis
|
||||
desc = "A single use autosurgeon that contains a penis. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
uses = 1
|
||||
starting_organ = /obj/item/organ/genital/penis
|
||||
|
||||
/obj/item/autosurgeon/testicles
|
||||
desc = "A single use autosurgeon that contains a set of testicles. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
uses = 1
|
||||
starting_organ = /obj/item/organ/genital/testicles
|
||||
|
||||
/obj/item/autosurgeon/vagina
|
||||
desc = "A single use autosurgeon that contains a vagina. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
uses = 1
|
||||
starting_organ = /obj/item/organ/genital/vagina
|
||||
|
||||
/obj/item/autosurgeon/breasts
|
||||
desc = "A single use autosurgeon that contains a set of breasts. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
uses = 1
|
||||
starting_organ = /obj/item/organ/genital/breasts
|
||||
|
||||
/obj/item/autosurgeon/womb
|
||||
desc = "A single use autosurgeon that contains a womb. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
uses = 1
|
||||
starting_organ = /obj/item/organ/genital/womb
|
||||
@@ -25,7 +25,7 @@
|
||||
return
|
||||
var/mob/living/carbon/C = owner
|
||||
// genetic deafness prevents the body from using the ears, even if healthy
|
||||
if(C.has_trait(TRAIT_DEAF))
|
||||
if(HAS_TRAIT(C, TRAIT_DEAF))
|
||||
deaf = max(deaf, 1)
|
||||
else if(ear_damage < UNHEALING_EAR_DAMAGE) // if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs.
|
||||
ear_damage = max(ear_damage - 0.05, 0)
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
var/mob/living/carbon/C = owner
|
||||
|
||||
if(iscarbon(owner) && C.has_trait(TRAIT_DEAF))
|
||||
if(iscarbon(owner) && HAS_TRAIT(C, TRAIT_DEAF))
|
||||
deaf = 1
|
||||
|
||||
/obj/item/organ/ears/proc/adjustEarDamage(ddmg, ddeaf)
|
||||
@@ -94,3 +94,9 @@
|
||||
H.dna.features["ears"] = "None"
|
||||
H.dna.species.mutant_bodyparts -= "ears"
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/ears/bronze
|
||||
name = "tin ears"
|
||||
desc = "The robust ears of a bronze golem. "
|
||||
damage_multiplier = 0.1 //STRONK
|
||||
bang_protect = 1 //Fear me weaklings.
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
HMN.regenerate_icons()
|
||||
else
|
||||
eye_color = HMN.eye_color
|
||||
if(HMN.has_trait(TRAIT_NIGHT_VISION) && !lighting_alpha)
|
||||
if(HAS_TRAIT(HMN, TRAIT_NIGHT_VISION) && !lighting_alpha)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT
|
||||
see_in_dark = 8
|
||||
M.update_tint()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//slowly heal liver damage
|
||||
damage = max(0, damage - 0.1)
|
||||
|
||||
if(filterToxins && !owner.has_trait(TRAIT_TOXINLOVER))
|
||||
if(filterToxins && !HAS_TRAIT(owner, TRAIT_TOXINLOVER))
|
||||
//handle liver toxin filtration
|
||||
for(var/I in C.reagents.reagent_list)
|
||||
var/datum/reagent/pickedreagent = I
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
/obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
|
||||
if((H.status_flags & GODMODE))
|
||||
return
|
||||
if(H.has_trait(TRAIT_NOBREATH))
|
||||
if(HAS_TRAIT(H, TRAIT_NOBREATH))
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
else if(!H.has_trait(TRAIT_NOCRITDAMAGE))
|
||||
else if(!HAS_TRAIT(H, TRAIT_NOCRITDAMAGE))
|
||||
H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
|
||||
|
||||
H.failed_last_breath = TRUE
|
||||
@@ -84,13 +84,11 @@
|
||||
|
||||
var/list/breath_gases = breath.gases
|
||||
|
||||
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen, /datum/gas/tritium, /datum/gas/nitryl, /datum/gas/pluoxium, /datum/gas/stimulum)
|
||||
|
||||
//Partial pressures in our breath
|
||||
var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium][MOLES]))
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen][MOLES])
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES])
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES])
|
||||
var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium]))
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen])
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma])
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide])
|
||||
|
||||
|
||||
//-- OXY --//
|
||||
@@ -98,7 +96,7 @@
|
||||
//Too much oxygen! //Yes, some species may not like it.
|
||||
if(safe_oxygen_max)
|
||||
if((O2_pp > safe_oxygen_max) && safe_oxygen_max == 0) //I guess plasma men technically need to have a check.
|
||||
var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10
|
||||
var/ratio = (breath_gases[/datum/gas/oxygen]/safe_oxygen_max) * 10
|
||||
H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
|
||||
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
|
||||
|
||||
@@ -121,18 +119,18 @@
|
||||
//Too little oxygen!
|
||||
if(safe_oxygen_min)
|
||||
if(O2_pp < safe_oxygen_min)
|
||||
gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen])
|
||||
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/oxygen][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/oxygen]
|
||||
H.clear_alert("not_enough_oxy")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/oxygen][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/oxygen] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
//-- Nitrogen --//
|
||||
@@ -140,7 +138,7 @@
|
||||
//Too much nitrogen!
|
||||
if(safe_nitro_max)
|
||||
if(N2_pp > safe_nitro_max)
|
||||
var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10
|
||||
var/ratio = (breath_gases[/datum/gas/nitrogen]/safe_nitro_max) * 10
|
||||
H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
|
||||
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
|
||||
H.losebreath += 2
|
||||
@@ -150,18 +148,18 @@
|
||||
//Too little nitrogen!
|
||||
if(safe_nitro_min)
|
||||
if(N2_pp < safe_nitro_min)
|
||||
gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen])
|
||||
H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/nitrogen][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/nitrogen]
|
||||
H.clear_alert("nitro")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/nitrogen][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/nitrogen] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
//-- CO2 --//
|
||||
@@ -187,18 +185,18 @@
|
||||
//Too little CO2!
|
||||
if(safe_co2_min)
|
||||
if(CO2_pp < safe_co2_min)
|
||||
gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide])
|
||||
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/carbon_dioxide][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/carbon_dioxide]
|
||||
H.clear_alert("not_enough_co2")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/oxygen][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] -= gas_breathed
|
||||
breath_gases[/datum/gas/oxygen] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
|
||||
@@ -207,7 +205,7 @@
|
||||
//Too much toxins!
|
||||
if(safe_toxins_max)
|
||||
if(Toxins_pp > safe_toxins_max)
|
||||
var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_toxins_max) * 10
|
||||
var/ratio = (breath_gases[/datum/gas/plasma]/safe_toxins_max) * 10
|
||||
H.apply_damage_type(CLAMP(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
|
||||
H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
|
||||
else
|
||||
@@ -217,18 +215,18 @@
|
||||
//Too little toxins!
|
||||
if(safe_toxins_min)
|
||||
if(Toxins_pp < safe_toxins_min)
|
||||
gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma][MOLES])
|
||||
gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma])
|
||||
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
if(H.health >= H.crit_threshold)
|
||||
H.adjustOxyLoss(-5)
|
||||
gas_breathed = breath_gases[/datum/gas/plasma][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/plasma]
|
||||
H.clear_alert("not_enough_tox")
|
||||
|
||||
//Exhale
|
||||
breath_gases[/datum/gas/plasma][MOLES] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
|
||||
breath_gases[/datum/gas/plasma] -= gas_breathed
|
||||
breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
|
||||
gas_breathed = 0
|
||||
|
||||
|
||||
@@ -238,7 +236,7 @@
|
||||
|
||||
// N2O
|
||||
|
||||
var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide][MOLES])
|
||||
var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide])
|
||||
if(SA_pp > SA_para_min) // Enough to make us stunned for a bit
|
||||
H.Unconscious(60) // 60 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
@@ -249,7 +247,7 @@
|
||||
|
||||
// BZ
|
||||
|
||||
var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz][MOLES])
|
||||
var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz])
|
||||
if(bz_pp > BZ_trip_balls_min)
|
||||
H.hallucination += 10
|
||||
H.reagents.add_reagent("bz_metabolites",5)
|
||||
@@ -262,14 +260,14 @@
|
||||
|
||||
|
||||
// Tritium
|
||||
var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium][MOLES])
|
||||
var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium])
|
||||
if (trit_pp > 50)
|
||||
H.radiation += trit_pp/2 //If you're breathing in half an atmosphere of radioactive gas, you fucked up.
|
||||
else
|
||||
H.radiation += trit_pp/10
|
||||
|
||||
// Nitryl
|
||||
var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl][MOLES])
|
||||
var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl])
|
||||
if (prob(nitryl_pp))
|
||||
to_chat(H, "<span class='alert'>Your mouth feels like it's burning!</span>")
|
||||
if (nitryl_pp >40)
|
||||
@@ -280,68 +278,69 @@
|
||||
H.silent = max(H.silent, 3)
|
||||
else
|
||||
H.adjustFireLoss(nitryl_pp/4)
|
||||
gas_breathed = breath_gases[/datum/gas/nitryl][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/nitryl]
|
||||
if (gas_breathed > gas_stimulation_min)
|
||||
H.reagents.add_reagent("no2",1)
|
||||
|
||||
breath_gases[/datum/gas/nitryl][MOLES]-=gas_breathed
|
||||
breath_gases[/datum/gas/nitryl]-=gas_breathed
|
||||
|
||||
// Stimulum
|
||||
gas_breathed = breath_gases[/datum/gas/stimulum][MOLES]
|
||||
gas_breathed = breath_gases[/datum/gas/stimulum]
|
||||
if (gas_breathed > gas_stimulation_min)
|
||||
var/existing = H.reagents.get_reagent_amount("stimulum")
|
||||
H.reagents.add_reagent("stimulum",max(0, 1 - existing))
|
||||
breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed
|
||||
H.reagents.add_reagent("stimulum", max(0, 5 - existing))
|
||||
breath_gases[/datum/gas/stimulum]-=gas_breathed
|
||||
|
||||
// Miasma
|
||||
if (breath_gases[/datum/gas/miasma])
|
||||
var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma][MOLES])
|
||||
var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma])
|
||||
if(miasma_pp > MINIMUM_MOLES_DELTA_TO_MOVE)
|
||||
|
||||
//Miasma sickness
|
||||
if(prob(0.5 * miasma_pp))
|
||||
var/datum/disease/advance/miasma_disease = new /datum/disease/advance/random(2,3)
|
||||
miasma_disease.name = "Unknown"
|
||||
miasma_disease.try_infect(owner)
|
||||
//Miasma sickness
|
||||
if(prob(0.05 * miasma_pp))
|
||||
var/datum/disease/advance/miasma_disease = new /datum/disease/advance/random(2,3)
|
||||
miasma_disease.name = "Unknown"
|
||||
miasma_disease.try_infect(owner)
|
||||
|
||||
// Miasma side effects
|
||||
switch(miasma_pp)
|
||||
if(1 to 5)
|
||||
// At lower pp, give out a little warning
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
|
||||
if(prob(5))
|
||||
to_chat(owner, "<span class='notice'>There is an unpleasant smell in the air.</span>")
|
||||
if(5 to 15)
|
||||
//At somewhat higher pp, warning becomes more obvious
|
||||
if(prob(15))
|
||||
to_chat(owner, "<span class='warning'>You smell something horribly decayed inside this room.</span>")
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/bad_smell)
|
||||
if(15 to 30)
|
||||
//Small chance to vomit. By now, people have internals on anyway
|
||||
if(prob(5))
|
||||
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
|
||||
owner.vomit()
|
||||
if(30 to INFINITY)
|
||||
//Higher chance to vomit. Let the horror start
|
||||
if(prob(15))
|
||||
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
|
||||
owner.vomit()
|
||||
else
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
|
||||
// Miasma side effects
|
||||
switch(miasma_pp)
|
||||
if(1 to 5)
|
||||
// At lower pp, give out a little warning
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
|
||||
if(prob(5))
|
||||
to_chat(owner, "<span class='notice'>There is an unpleasant smell in the air.</span>")
|
||||
if(5 to 15)
|
||||
//At somewhat higher pp, warning becomes more obvious
|
||||
if(prob(15))
|
||||
to_chat(owner, "<span class='warning'>You smell something horribly decayed inside this room.</span>")
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/bad_smell)
|
||||
if(15 to 30)
|
||||
//Small chance to vomit. By now, people have internals on anyway
|
||||
if(prob(5))
|
||||
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
|
||||
owner.vomit()
|
||||
if(30 to INFINITY)
|
||||
//Higher chance to vomit. Let the horror start
|
||||
if(prob(15))
|
||||
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
|
||||
owner.vomit()
|
||||
else
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
|
||||
|
||||
// In a full miasma atmosphere with 101.34 pKa, about 10 disgust per breath, is pretty low compared to threshholds
|
||||
// Then again, this is a purely hypothetical scenario and hardly reachable
|
||||
owner.adjust_disgust(0.1 * miasma_pp)
|
||||
// In a full miasma atmosphere with 101.34 pKa, about 10 disgust per breath, is pretty low compared to threshholds
|
||||
// Then again, this is a purely hypothetical scenario and hardly reachable
|
||||
owner.adjust_disgust(0.1 * miasma_pp)
|
||||
|
||||
breath_gases[/datum/gas/miasma][MOLES]-=gas_breathed
|
||||
breath_gases[/datum/gas/miasma]-=gas_breathed
|
||||
|
||||
// Clear out moods when no miasma at all
|
||||
else
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
|
||||
|
||||
handle_breath_temperature(breath, H)
|
||||
breath.garbage_collect()
|
||||
GAS_GARBAGE_COLLECT(breath.gases)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -365,7 +364,7 @@
|
||||
/obj/item/organ/lungs/proc/handle_breath_temperature(datum/gas_mixture/breath, mob/living/carbon/human/H) // called by human/life, handles temperatures
|
||||
var/breath_temperature = breath.temperature
|
||||
|
||||
if(!H.has_trait(TRAIT_RESISTCOLD)) // COLD DAMAGE
|
||||
if(!HAS_TRAIT(H, TRAIT_RESISTCOLD)) // COLD DAMAGE
|
||||
var/cold_modifier = H.dna.species.coldmod
|
||||
if(breath_temperature < cold_level_3_threshold)
|
||||
H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type)
|
||||
@@ -377,7 +376,7 @@
|
||||
if(prob(20))
|
||||
to_chat(H, "<span class='warning'>You feel [cold_message] in your [name]!</span>")
|
||||
|
||||
if(!H.has_trait(TRAIT_RESISTHEAT)) // HEAT DAMAGE
|
||||
if(!HAS_TRAIT(H, TRAIT_RESISTHEAT)) // HEAT DAMAGE
|
||||
var/heat_modifier = H.dna.species.heatmod
|
||||
if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold)
|
||||
H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type)
|
||||
@@ -444,3 +443,14 @@
|
||||
heat_level_1_threshold = 400 // better adapted for heat, obv. Lavaland standard is 300
|
||||
heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3
|
||||
|
||||
/obj/item/organ/lungs/slime
|
||||
name = "vacuole"
|
||||
desc = "A large organelle designed to store oxygen and other important gasses."
|
||||
|
||||
safe_toxins_max = 0 //We breathe this to gain POWER.
|
||||
|
||||
/obj/item/organ/lungs/slime/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if (breath && breath.gases[/datum/gas/plasma])
|
||||
var/plasma_pp = breath.get_breath_partial_pressure(breath.gases[/datum/gas/plasma])
|
||||
owner.blood_volume += (0.2 * plasma_pp) // 10/s when breathing literally nothing but plasma, which will suffocate you.
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
var/breathes = TRUE
|
||||
var/blooded = TRUE
|
||||
if(dna && dna.species)
|
||||
if(has_trait(TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
if(HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
breathes = FALSE
|
||||
if(NOBLOOD in dna.species.species_traits)
|
||||
blooded = FALSE
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/list/languages_possible
|
||||
var/say_mod = null
|
||||
var/taste_sensitivity = 15 // lower is more sensitive.
|
||||
var/modifies_speech = FALSE
|
||||
var/static/list/languages_possible_base = typecacheof(list(
|
||||
/datum/language/common,
|
||||
/datum/language/draconic,
|
||||
@@ -17,30 +18,32 @@
|
||||
/datum/language/beachbum,
|
||||
/datum/language/ratvar,
|
||||
/datum/language/aphasia,
|
||||
/datum/language/slime,
|
||||
))
|
||||
|
||||
/obj/item/organ/tongue/Initialize(mapload)
|
||||
. = ..()
|
||||
languages_possible = languages_possible_base
|
||||
|
||||
/obj/item/organ/tongue/get_spans()
|
||||
return list()
|
||||
|
||||
/obj/item/organ/tongue/proc/TongueSpeech(var/message)
|
||||
return message
|
||||
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args)
|
||||
|
||||
/obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(say_mod && M.dna && M.dna.species)
|
||||
M.dna.species.say_mod = say_mod
|
||||
if (modifies_speech)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
M.UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/organ/tongue/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(say_mod && M.dna && M.dna.species)
|
||||
M.dna.species.say_mod = initial(M.dna.species.say_mod)
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
M.RegisterSignal(M, COMSIG_MOB_SAY, /mob/living/carbon/.proc/handle_tongueless_speech)
|
||||
|
||||
/obj/item/organ/tongue/could_speak_in_language(datum/language/dt)
|
||||
. = is_type_in_typecache(dt, languages_possible)
|
||||
return is_type_in_typecache(dt, languages_possible)
|
||||
|
||||
/obj/item/organ/tongue/lizard
|
||||
name = "forked tongue"
|
||||
@@ -48,14 +51,16 @@
|
||||
icon_state = "tonguelizard"
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // combined nose + tongue, extra sensitive
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/lizard/TongueSpeech(var/message)
|
||||
var/regex/lizard_hiss = new("s+", "g")
|
||||
var/regex/lizard_hiSS = new("S+", "g")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
/obj/item/organ/tongue/lizard/handle_speech(datum/source, list/speech_args)
|
||||
var/static/regex/lizard_hiss = new("s+", "g")
|
||||
var/static/regex/lizard_hiSS = new("S+", "g")
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = lizard_hiss.Replace(message, "sss")
|
||||
message = lizard_hiSS.Replace(message, "SSS")
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/obj/item/organ/tongue/fly
|
||||
name = "proboscis"
|
||||
@@ -63,14 +68,16 @@
|
||||
icon_state = "tonguefly"
|
||||
say_mod = "buzzes"
|
||||
taste_sensitivity = 25 // you eat vomit, this is a mercy
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/fly/TongueSpeech(var/message)
|
||||
var/regex/fly_buzz = new("z+", "g")
|
||||
var/regex/fly_buZZ = new("Z+", "g")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
/obj/item/organ/tongue/fly/handle_speech(datum/source, list/speech_args)
|
||||
var/static/regex/fly_buzz = new("z+", "g")
|
||||
var/static/regex/fly_buZZ = new("Z+", "g")
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = fly_buzz.Replace(message, "zzz")
|
||||
message = fly_buZZ.Replace(message, "ZZZ")
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/obj/item/organ/tongue/abductor
|
||||
name = "superlingual matrix"
|
||||
@@ -78,9 +85,11 @@
|
||||
icon_state = "tongueayylmao"
|
||||
say_mod = "gibbers"
|
||||
taste_sensitivity = 101 // ayys cannot taste anything.
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/abductor/TongueSpeech(var/message)
|
||||
/obj/item/organ/tongue/abductor/handle_speech(datum/source, list/speech_args)
|
||||
//Hacks
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/mob/living/carbon/human/user = usr
|
||||
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
|
||||
user.log_talk(message, LOG_SAY, tag="abductor")
|
||||
@@ -96,7 +105,7 @@
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [rendered]")
|
||||
return ""
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/obj/item/organ/tongue/zombie
|
||||
name = "rotting tongue"
|
||||
@@ -104,9 +113,10 @@
|
||||
icon_state = "tonguezombie"
|
||||
say_mod = "moans"
|
||||
taste_sensitivity = 32
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/zombie/TongueSpeech(var/message)
|
||||
var/list/message_list = splittext(message, " ")
|
||||
/obj/item/organ/tongue/zombie/handle_speech(datum/source, list/speech_args)
|
||||
var/list/message_list = splittext(speech_args[SPEECH_MESSAGE], " ")
|
||||
var/maxchanges = max(round(message_list.len / 1.5), 2)
|
||||
|
||||
for(var/i = rand(maxchanges / 2, maxchanges), i > 0, i--)
|
||||
@@ -119,7 +129,7 @@
|
||||
if(prob(20) && message_list.len > 3)
|
||||
message_list.Insert(insertpos, "[pick("BRAINS", "Brains", "Braaaiinnnsss", "BRAAAIIINNSSS")]...")
|
||||
|
||||
return jointext(message_list, " ")
|
||||
speech_args[SPEECH_MESSAGE] = jointext(message_list, " ")
|
||||
|
||||
/obj/item/organ/tongue/alien
|
||||
name = "alien tongue"
|
||||
@@ -127,6 +137,7 @@
|
||||
icon_state = "tonguexeno"
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED
|
||||
modifies_speech = TRUE // not really, they just hiss
|
||||
var/static/list/languages_possible_alien = typecacheof(list(
|
||||
/datum/language/xenocommon,
|
||||
/datum/language/common,
|
||||
@@ -138,9 +149,8 @@
|
||||
. = ..()
|
||||
languages_possible = languages_possible_alien
|
||||
|
||||
/obj/item/organ/tongue/alien/TongueSpeech(var/message)
|
||||
/obj/item/organ/tongue/alien/handle_speech(datum/source, list/speech_args)
|
||||
playsound(owner, "hiss", 25, 1, 1)
|
||||
return message
|
||||
|
||||
/obj/item/organ/tongue/bone
|
||||
name = "bone \"tongue\""
|
||||
@@ -149,7 +159,7 @@
|
||||
say_mod = "rattles"
|
||||
attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned")
|
||||
taste_sensitivity = 101 // skeletons cannot taste anything
|
||||
|
||||
modifies_speech = TRUE
|
||||
var/chattering = FALSE
|
||||
var/phomeme_type = "sans"
|
||||
var/list/phomeme_types = list("sans", "papyrus")
|
||||
@@ -158,29 +168,20 @@
|
||||
. = ..()
|
||||
phomeme_type = pick(phomeme_types)
|
||||
|
||||
/obj/item/organ/tongue/bone/TongueSpeech(var/message)
|
||||
. = message
|
||||
|
||||
if(chattering)
|
||||
//Annoy everyone nearby with your chattering.
|
||||
chatter(message, phomeme_type, usr)
|
||||
|
||||
/obj/item/organ/tongue/bone/get_spans()
|
||||
. = ..()
|
||||
// Feature, if the tongue talks directly, it will speak with its span
|
||||
/obj/item/organ/tongue/bone/handle_speech(datum/source, list/speech_args)
|
||||
if (chattering)
|
||||
chatter(speech_args[SPEECH_MESSAGE], phomeme_type, source)
|
||||
switch(phomeme_type)
|
||||
if("sans")
|
||||
. |= SPAN_SANS
|
||||
speech_args[SPEECH_SPANS] |= SPAN_SANS
|
||||
if("papyrus")
|
||||
. |= SPAN_PAPYRUS
|
||||
speech_args[SPEECH_SPANS] |= SPAN_PAPYRUS
|
||||
|
||||
/obj/item/organ/tongue/bone/plasmaman
|
||||
name = "plasma bone \"tongue\""
|
||||
desc = "Like animated skeletons, Plasmamen vibrate their teeth in order to produce speech."
|
||||
icon_state = "tongueplasma"
|
||||
|
||||
/obj/item/organ/tongue/bone/plasmaman/get_spans()
|
||||
return
|
||||
modifies_speech = FALSE
|
||||
|
||||
/obj/item/organ/tongue/robot
|
||||
name = "robotic voicebox"
|
||||
@@ -189,10 +190,18 @@
|
||||
icon_state = "tonguerobot"
|
||||
say_mod = "states"
|
||||
attack_verb = list("beeped", "booped")
|
||||
modifies_speech = TRUE
|
||||
taste_sensitivity = 25 // not as good as an organic tongue
|
||||
var/electronics_magic = TRUE
|
||||
|
||||
/obj/item/organ/tongue/robot/can_speak_in_language(datum/language/dt)
|
||||
. = TRUE // THE MAGIC OF ELECTRONICS
|
||||
return ..() || electronics_magic
|
||||
|
||||
/obj/item/organ/tongue/robot/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
/obj/item/organ/tongue/robot/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
|
||||
|
||||
/obj/item/organ/tongue/robot/ipc
|
||||
name = "positronic voicebox"
|
||||
say_mod = "beeps"
|
||||
desc = "A voice synthesizer used by IPCs to smoothly interface with organic lifeforms."
|
||||
electronics_magic = FALSE
|
||||
@@ -13,8 +13,8 @@
|
||||
user.visible_message("[user] begins to alter [target]'s appearance.", "<span class='notice'>You begin to alter [target]'s appearance...</span>")
|
||||
|
||||
/datum/surgery_step/reshape_face/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(target.has_trait(TRAIT_DISFIGURED, TRAIT_GENERIC))
|
||||
target.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
if(HAS_TRAIT_FROM(target, TRAIT_DISFIGURED, TRAIT_GENERIC))
|
||||
REMOVE_TRAIT(target, TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
user.visible_message("[user] successfully restores [target]'s appearance!", "<span class='notice'>You successfully restore [target]'s appearance.</span>")
|
||||
else
|
||||
var/list/names = list()
|
||||
|
||||
@@ -49,9 +49,14 @@
|
||||
|
||||
var/datum/surgery_step/S = get_surgery_step()
|
||||
if(S)
|
||||
if(S.try_op(user, target, user.zone_selected, user.get_active_held_item(), src, try_to_fail))
|
||||
return 1
|
||||
return 0
|
||||
var/obj/item/tool = user.get_active_held_item()
|
||||
if(S.try_op(user, target, user.zone_selected, tool, src, try_to_fail))
|
||||
return TRUE
|
||||
if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
|
||||
return TRUE
|
||||
if(tool.item_flags & SURGICAL_TOOL) //Just because you used the wrong tool it doesn't mean you meant to whack the patient with it
|
||||
to_chat(user, "<span class='warning'>This step requires a different tool!</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/surgery/proc/get_surgery_step()
|
||||
var/step_type = steps[status]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "retractor"
|
||||
materials = list(MAT_METAL=6000, MAT_GLASS=3000)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -33,6 +34,7 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "hemostat"
|
||||
materials = list(MAT_METAL=5000, MAT_GLASS=2500)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("attacked", "pinched")
|
||||
@@ -66,6 +68,7 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "cautery"
|
||||
materials = list(MAT_METAL=2500, MAT_GLASS=750)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("burnt")
|
||||
@@ -102,6 +105,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
hitsound = 'sound/weapons/circsawhit.ogg'
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=6000)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
force = 15
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -151,6 +155,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=4000, MAT_GLASS=1000)
|
||||
item_flags = SURGICAL_TOOL
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
@@ -209,6 +214,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
hitsound = 'sound/weapons/circsawhit.ogg'
|
||||
throwhitsound = 'sound/weapons/pierce.ogg'
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
force = 15
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -278,6 +284,7 @@
|
||||
desc = "A container for holding body parts."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "evidenceobj"
|
||||
item_flags = SURGICAL_TOOL
|
||||
|
||||
/obj/item/organ_storage/afterattack(obj/item/I, mob/user, proximity)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user