Merge branch 'CHOMPStation2:master' into Organs

This commit is contained in:
Cyrelius
2023-03-02 22:45:46 -08:00
committed by GitHub
336 changed files with 71851 additions and 10700 deletions

View File

@@ -117,8 +117,7 @@
/obj/item/organ/external/emp_act(severity)
for(var/obj/O as anything in src.contents)
O.emp_act(severity)
if(!(robotic >= ORGAN_ROBOT))
if(!(robotic >= ORGAN_ROBOT) || robotic == ORGAN_NANOFORM) //CHOMPEdit - Proteans handle EMP's differently
return
var/burn_damage = 0
for(var/i = 1; i <= robotic; i++)
@@ -1140,7 +1139,8 @@ Note that amputating the affected organ does in fact remove the infection from t
force_icon = R.icon
brute_mod *= R.robo_brute_mod
burn_mod *= R.robo_burn_mod
prosthetic_digi = R.can_be_digitigrade //CHOMPStation edit
skip_robo_icon = R.no_icon //CHOMPStation edit
digi_prosthetic = R.can_be_digitigrade //CHOMPStation edit
if(R.lifelike)
robotic = ORGAN_LIFELIKE
name = "[initial(name)]"

View File

@@ -4,6 +4,8 @@
/mob/var/list/pain_stored = list()
/mob/var/last_pain_message = ""
/mob/var/next_pain_time = 0
/mob/var/multilimb_pain_time = 0 // Global pain cooldown exists to prevent spam for multi-limb damage
// message is the custom message to be displayed
// power decides how much painkillers will stop the message
@@ -16,10 +18,32 @@
message = "<font size=3>[message]</font>"
// Anti message spam checks
if(force || (message != last_pain_message) || (world.time >= next_pain_time))
// If multiple limbs are injured, cooldown is ignored to print all injuries until all limbs are iterated over
if(src.is_preference_enabled(/datum/client_preference/pain_frequency))
switch(power)
if(0 to 5)
force = 0
if(6 to 20)
force = prob(1)
if(force || (message != last_pain_message) || (world.time >= next_pain_time))
switch(power)
if(0 to 5)
next_pain_time = world.time + 300 SECONDS
multilimb_pain_time = world.time + 45 SECONDS
if(6 to 20)
next_pain_time = world.time + clamp((30 - power) SECONDS, 10 SECONDS, 30 SECONDS)
multilimb_pain_time = world.time + clamp((30 - power) SECONDS, 10 SECONDS, 30 SECONDS)
if(21 to INFINITY)
next_pain_time = world.time + (100 - power)
multilimb_pain_time = world.time + (100 - power)
last_pain_message = message
to_chat(src,message)
else if(force || (message != last_pain_message) || (world.time >= next_pain_time))
last_pain_message = message
to_chat(src,message)
next_pain_time = world.time + (100-power)
next_pain_time = world.time + (100 - power)
multilimb_pain_time = world.time + (100 - power)
/mob/living/carbon/human/proc/handle_pain()
if(stat)
@@ -28,7 +52,7 @@
if(!can_feel_pain() && !synth_cosmetic_pain)
return
if(world.time < next_pain_time)
if(world.time < multilimb_pain_time) //prevents spam in case of multi-limb injuries.
return
var/maxdam = 0
var/obj/item/organ/external/damaged_organ = null
@@ -77,4 +101,4 @@
if(31 to 60)
custom_pain("Your whole body hurts badly.", getToxLoss())
if(61 to INFINITY)
custom_pain("Your body aches all over, it's driving you mad.", getToxLoss())
custom_pain("Your body aches all over, it's driving you mad.", getToxLoss())

View File

@@ -1,5 +1,10 @@
GLOBAL_LIST_INIT(dsi_to_species, list(SPECIES_TAJARAN = "DSI - Tajaran", SPECIES_UNATHI = "DSI - Lizard", SPECIES_SERGAL = "DSI - Sergal", SPECIES_NEVREAN = "DSI - Nevrean", \
SPECIES_VULPKANIN = "DSI - Vulpkanin", SPECIES_AKULA = "DSI - Akula", SPECIES_VASILISSAN = "DSI - Vasilissan", SPECIES_ZORREN = "DSI - Zorren",\
SPECIES_TESHARI = "DSI - Teshari", SPECIES_FENNEC = "DSI - Fennec"))
/datum/robolimb
var/can_be_digitigrade = FALSE //maybe move this over into more of a "does this have a custom digitigrade sprite, and if so, what is its icon file/icon name in the limb's file" when someone can be bothered making them
var/no_icon = FALSE //specifically for DSI things, makes it so it doesn't override the species icons
var/can_be_digitigrade = FALSE //used for skipping the icon if it can be digitigrade - maybe turn this into more of a 'use this icon/iconstate' instead later, when actual prosthetic digi icons get made
/datum/robolimb/valehoundhead
company = "VALE Hound- Head"
@@ -37,4 +42,14 @@
/datum/robolimb/dsi_teshari/New()
. = ..()
species_cannot_use -= SPECIES_PROTEAN
species_cannot_use -= SPECIES_PROTEAN
/datum/robolimb/dsi_other
company = "DSI - Adaptive"
desc = "This limb has a realistic design and squish. By Darkside Incorperated."
blood_color = "#ffe2ff"
lifelike = 1
unavailable_to_build = 1
skin_tone = 1
no_icon = TRUE