mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-28 22:46:22 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
)
|
||||
|
||||
for(var/obj/item/organ/external/org in H.organs)
|
||||
var/status = ""
|
||||
var/list/status = list()
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
if(halloss > 0)
|
||||
@@ -181,29 +181,39 @@
|
||||
brutedamage += halloss
|
||||
if(prob(30))
|
||||
burndamage += halloss
|
||||
switch(brutedamage)
|
||||
if(1 to 20)
|
||||
status += "bruised"
|
||||
if(20 to 40)
|
||||
status += "wounded"
|
||||
if(40 to INFINITY)
|
||||
status += "mangled"
|
||||
|
||||
if(brutedamage > 0)
|
||||
status = "bruised"
|
||||
if(brutedamage > 20)
|
||||
status = "bleeding"
|
||||
if(brutedamage > 40)
|
||||
status = "mangled"
|
||||
if(brutedamage > 0 && burndamage > 0)
|
||||
status += " and "
|
||||
if(burndamage > 40)
|
||||
status += "peeling away"
|
||||
switch(burndamage)
|
||||
if(1 to 10)
|
||||
status += "numb"
|
||||
if(10 to 40)
|
||||
status += "blistered"
|
||||
if(40 to INFINITY)
|
||||
status += "peeling away"
|
||||
|
||||
else if(burndamage > 10)
|
||||
status += "blistered"
|
||||
else if(burndamage > 0)
|
||||
status += "numb"
|
||||
if(org.status & ORGAN_DESTROYED)
|
||||
status = "MISSING!"
|
||||
status += "MISSING"
|
||||
if(org.status & ORGAN_MUTATED)
|
||||
status = "weirdly shapen."
|
||||
if(status == "")
|
||||
status = "OK"
|
||||
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
|
||||
status += "weirdly shapen"
|
||||
if(org.dislocated == 2)
|
||||
status += "dislocated"
|
||||
if(org.status & ORGAN_BROKEN)
|
||||
status += "hurts when touched"
|
||||
if(org.status & ORGAN_DEAD)
|
||||
status += "is bruised and necrotic"
|
||||
if(!org.is_usable())
|
||||
status += "dangling uselessly"
|
||||
if(status.len)
|
||||
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].",1)
|
||||
else
|
||||
src.show_message("My [org.name] is <span class='notice'> OK.",1)
|
||||
|
||||
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
|
||||
H.play_xylophone()
|
||||
else if (on_fire)
|
||||
@@ -452,17 +462,17 @@
|
||||
Stun(stun_duration)
|
||||
Weaken(Floor(stun_duration/2))
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
|
||||
if(effect in chem_effects)
|
||||
chem_effects[effect] += magnitude
|
||||
else
|
||||
chem_effects[effect] = magnitude
|
||||
|
||||
chem_effects[effect] = magnitude
|
||||
|
||||
/mob/living/carbon/get_default_language()
|
||||
if(default_language)
|
||||
return default_language
|
||||
|
||||
if(!species)
|
||||
return null
|
||||
return species.default_language ? all_languages[species.default_language] : null
|
||||
return species.default_language ? all_languages[species.default_language] : null
|
||||
|
||||
@@ -274,76 +274,17 @@
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.name]"] += " some dents"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
|
||||
if(temp.brute_dam && temp.burn_dam)
|
||||
wound_flavor_text["[temp.name]"] += " and"
|
||||
if(temp.burn_dam) switch(temp.burn_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
|
||||
if(wound_flavor_text["[temp.name]"])
|
||||
wound_flavor_text["[temp.name]"] += "!</span>\n"
|
||||
else if(temp.wounds.len > 0)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
if(W.internal && !temp.open) continue // can't see internal wounds
|
||||
var/this_wound_desc = W.desc
|
||||
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
|
||||
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
|
||||
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
|
||||
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
|
||||
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
|
||||
if(this_wound_desc in wound_descriptors)
|
||||
wound_descriptors[this_wound_desc] += W.amount
|
||||
continue
|
||||
wound_descriptors[this_wound_desc] = W.amount
|
||||
if(wound_descriptors.len)
|
||||
var/list/flavor_text = list()
|
||||
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
|
||||
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
|
||||
for(var/wound in wound_descriptors)
|
||||
switch(wound_descriptors[wound])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has several [wound]s"
|
||||
else
|
||||
flavor_text += " several [wound]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has a bunch of [wound]s"
|
||||
else
|
||||
flavor_text += " a ton of [wound]\s"
|
||||
var/flavor_text_string = ""
|
||||
for(var/text = 1, text <= flavor_text.len, text++)
|
||||
if(text == flavor_text.len && flavor_text.len > 1)
|
||||
flavor_text_string += ", and"
|
||||
else if(flavor_text.len > 1 && text > 1)
|
||||
flavor_text_string += ","
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on [t_his] [temp.name].</span><br>"
|
||||
wound_flavor_text["[temp.name]"] = flavor_text_string
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
|
||||
else if(temp.wounds.len > 0 || temp.open)
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>"
|
||||
if(temp.status & ORGAN_BLEEDING)
|
||||
is_bleeding["[temp.name]"] = 1
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
if(temp.dislocated == 2)
|
||||
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.joint] is dislocated!</span><br>"
|
||||
if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
|
||||
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.name] is dented and swollen!</span><br>"
|
||||
|
||||
//Handles the text strings being added to the actual description.
|
||||
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
|
||||
@@ -354,9 +295,9 @@
|
||||
msg += wound_flavor_text["head"]
|
||||
else if(is_bleeding["head"])
|
||||
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
|
||||
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["chest"]
|
||||
else if(is_bleeding["chest"])
|
||||
if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["upper body"]
|
||||
else if(is_bleeding["upper body"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left arm"]
|
||||
@@ -374,9 +315,9 @@
|
||||
msg += wound_flavor_text["right hand"]
|
||||
else if(is_bleeding["right hand"])
|
||||
display_gloves = 1
|
||||
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["groin"]
|
||||
else if(is_bleeding["groin"])
|
||||
if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["lower body"]
|
||||
else if(is_bleeding["lower body"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left leg"]
|
||||
|
||||
@@ -1321,7 +1321,6 @@
|
||||
var/mob/S = src
|
||||
var/mob/U = usr
|
||||
var/self = null
|
||||
|
||||
if(S == U)
|
||||
self = 1 // Removing object from yourself.
|
||||
|
||||
@@ -1330,8 +1329,7 @@
|
||||
var/obj/item/organ/external/current_limb = organs_by_name[limb]
|
||||
if(current_limb && current_limb.dislocated == 2)
|
||||
limbs |= limb
|
||||
|
||||
var/choice = input(src,"Which joint do you wish to relocate?") as null|anything in limbs
|
||||
var/choice = input(usr,"Which joint do you wish to relocate?") as null|anything in limbs
|
||||
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
var/dislocation_str
|
||||
if(prob(W.force))
|
||||
dislocation_str = "[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!"
|
||||
organ.dislocate()
|
||||
organ.dislocate(1)
|
||||
return dislocation_str
|
||||
|
||||
//Used to attack a joint through grabbing
|
||||
@@ -324,7 +324,7 @@
|
||||
|
||||
user.visible_message("<span class='warning'>[user] begins to dislocate [src]'s [organ.joint]!</span>")
|
||||
if(do_after(user, 100))
|
||||
organ.dislocate()
|
||||
organ.dislocate(1)
|
||||
src.visible_message("<span class='danger'>[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -315,6 +315,9 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
|
||||
W.layer = 20
|
||||
|
||||
if(W.icon_action_button)
|
||||
update_action_buttons()
|
||||
|
||||
return 1
|
||||
|
||||
//Checks if a given slot can be accessed at this time, either to equip or unequip I
|
||||
|
||||
@@ -1131,8 +1131,6 @@
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg, global_hud.thermal, global_hud.meson, global_hud.science)
|
||||
|
||||
update_action_buttons()
|
||||
|
||||
if(damageoverlay.overlays)
|
||||
damageoverlay.overlays = list()
|
||||
|
||||
|
||||
@@ -129,7 +129,10 @@
|
||||
return
|
||||
if(istype(target,/obj/machinery/portable_atmospherics/hydroponics))
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/T = target
|
||||
T.harvest(user)
|
||||
if(T.harvest) //Try to harvest, assuming it's alive.
|
||||
T.harvest(user)
|
||||
else if(T.dead) //It's probably dead otherwise.
|
||||
T.remove_dead(user)
|
||||
else
|
||||
user << "Harvesting \a [target] is not the purpose of this tool. The [src] is for plants being grown."
|
||||
|
||||
|
||||
@@ -49,12 +49,16 @@
|
||||
var/obj/effect/plant/SV = locate() in loc
|
||||
SV.die_off(1)
|
||||
|
||||
if(locate(/obj/machinery/portable_atmospherics/hydroponics/soil/invisible) in loc)
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/SP = locate() in loc
|
||||
del(SP)
|
||||
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/effect/plant) in step)
|
||||
Move(step)
|
||||
var/obj/effect/plant/food
|
||||
food = locate(/obj/effect/plant) in oview(5,loc)
|
||||
if(food)
|
||||
var/step = get_step_to(src, food, 0)
|
||||
Move(step)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
..()
|
||||
|
||||
@@ -297,6 +297,43 @@
|
||||
assailant << "<span class='warning'>You are no longer pinning [affecting] to the ground.</span>"
|
||||
force_down = 0
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/E = H.get_organ(hit_zone)
|
||||
if(E && !(E.status & ORGAN_DESTROYED))
|
||||
assailant.visible_message("<span class='notice'>[assailant] starts inspecting [affecting]'s [E.name] carefully.</span>")
|
||||
if(do_mob(assailant,H, 10))
|
||||
if(E.wounds.len)
|
||||
assailant << "<span class='warning'>You find [E.get_wounds_desc()]</span>"
|
||||
else
|
||||
assailant << "<span class='notice'>You find no visible wounds.</span>"
|
||||
else
|
||||
assailant << "<span class='notice'>You must stand still to inspect [E] for wounds.</span>"
|
||||
assailant << "<span class='notice'>Checking bones now...</span>"
|
||||
if(do_mob(assailant, H, 20))
|
||||
if(E.status & ORGAN_BROKEN)
|
||||
assailant << "<span class='warning'>The [E.encased ? E.encased : "bone in the [E.name]"] moves slightly when you poke it!</span>"
|
||||
H.custom_pain("Your [E.name] hurts where it's poked.")
|
||||
else
|
||||
assailant << "<span class='notice'>The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine.</span>"
|
||||
else
|
||||
assailant << "<span class='notice'>You must stand still to feel [E] for fractures.</span>"
|
||||
assailant << "<span class='notice'>Checking skin now...</span>"
|
||||
if(do_mob(assailant, H, 10))
|
||||
var/bad = 0
|
||||
if(H.getToxLoss() >= 40)
|
||||
assailant << "<span class='warning'>[H] has an unhealthy skin discoloration.</span>"
|
||||
bad = 1
|
||||
if(H.getOxyLoss() >= 20)
|
||||
assailant << "<span class='warning'>[H]'s skin is unusaly pale.</span>"
|
||||
bad = 1
|
||||
if(E.status & ORGAN_DEAD)
|
||||
assailant << "<span class='warning'>[E] is decaying!</span>"
|
||||
if(!bad)
|
||||
assailant << "<span class='notice'>[H]'s skin is normal.</span>"
|
||||
else
|
||||
assailant << "<span class='notice'>You must stand still to check [H]'s skin for abnormalities.</span>"
|
||||
else
|
||||
assailant << "<span class='notice'>[H] is missing that bodypart.</span>"
|
||||
if(I_GRAB)
|
||||
if(state < GRAB_AGGRESSIVE)
|
||||
assailant << "<span class='warning'>You require a better grab to do this.</span>"
|
||||
|
||||
@@ -184,7 +184,10 @@ datum/preferences
|
||||
dummy.set_species(species)
|
||||
dummy.flags |= GODMODE
|
||||
copy_to(dummy)
|
||||
|
||||
for (var/obj/item/I in dummy)
|
||||
dummy.drop_from_inventory(I)
|
||||
if(I.loc != dummy)
|
||||
qdel(I)
|
||||
var/jobflag
|
||||
var/dept
|
||||
if(job_civilian_high)
|
||||
|
||||
@@ -106,7 +106,8 @@
|
||||
O.add_ai_verbs()
|
||||
|
||||
O.rename_self("ai",1)
|
||||
qdel(src)
|
||||
spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
|
||||
qdel(src)
|
||||
return O
|
||||
|
||||
//human -> robot
|
||||
@@ -158,7 +159,8 @@
|
||||
callHook("borgify", list(O))
|
||||
O.Namepick()
|
||||
|
||||
qdel(src)
|
||||
spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
|
||||
qdel(src)
|
||||
return O
|
||||
|
||||
//human -> alien
|
||||
|
||||
Reference in New Issue
Block a user