mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-25 21:16:39 +01:00
Removes redundant surgery for brain and eye repair, now covered by organ repair in general.
Attempted to limit regular surgery to non-robotic limbs and added surgical steps for robotic limbs. Readded checks for smoking reagent transfer. Fixes, oversights, tweaks with IPC. Added some reagent bypassing for NO_BLOOD and some checks to various affect_touch() calls for NO_SCAN/IPC. Added prosthetic-scanning functionality to cyborg analyzer. Added prosthetic analysis to the robot analyzer. Allowed people with internal cells to charge in robot chargers (IPCs).
This commit is contained in:
@@ -92,4 +92,4 @@
|
||||
desc = "A tightly furled roll of paper, covered with indecipherable runes."
|
||||
robotic = 2
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
icon_state = "scroll"
|
||||
|
||||
@@ -1224,16 +1224,26 @@
|
||||
else
|
||||
target_zone = user.zone_sel.selecting
|
||||
|
||||
switch(target_zone)
|
||||
if("head")
|
||||
if(head && head.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && wear_suit.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
var/obj/item/organ/external/affecting = get_organ(target_zone)
|
||||
var/fail_msg
|
||||
if(!affecting)
|
||||
. = 0
|
||||
fail_msg = "They are missing that limb."
|
||||
else if (affecting.status & ORGAN_ROBOT)
|
||||
. = 0
|
||||
fail_msg = "That limb is robotic."
|
||||
else
|
||||
switch(target_zone)
|
||||
if("head")
|
||||
if(head && head.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && wear_suit.flags & THICKMATERIAL)
|
||||
. = 0
|
||||
if(!. && error_msg && user)
|
||||
// Might need re-wording.
|
||||
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into.</span>"
|
||||
if(!fail_msg)
|
||||
fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into."
|
||||
user << "<span class='alert'>[fail_msg]</span>"
|
||||
|
||||
/mob/living/carbon/human/print_flavor_text(var/shrink = 1)
|
||||
var/list/equipment = list(src.head,src.wear_mask,src.glasses,src.w_uniform,src.wear_suit,src.gloves,src.shoes)
|
||||
|
||||
@@ -48,6 +48,12 @@
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(istype(H) && health < config.health_threshold_crit && health > config.health_threshold_dead)
|
||||
if(!H.check_has_mouth())
|
||||
H << "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>"
|
||||
return
|
||||
if(!check_has_mouth())
|
||||
H << "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>"
|
||||
return
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "<span class='notice'>Remove your mask!</span>"
|
||||
return 0
|
||||
|
||||
@@ -855,8 +855,6 @@
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
// TODO: stomach and bloodstream organ.
|
||||
|
||||
if(reagents)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
@@ -864,8 +862,9 @@
|
||||
if(species && species.reagent_tag)
|
||||
alien = species.reagent_tag
|
||||
touching.metabolize(alien, CHEM_TOUCH)
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(!(species.flags & NO_BLOOD))
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
@@ -1504,7 +1503,8 @@
|
||||
|
||||
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
|
||||
if(species && species.flags & NO_BLOOD) return PULSE_NONE //No blood, no pulse.
|
||||
if(species && species.flags & NO_BLOOD)
|
||||
return PULSE_NONE //No blood, no pulse.
|
||||
|
||||
if(stat == DEAD)
|
||||
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
language = "Sol Common" //todo?
|
||||
unarmed_types = list(/datum/unarmed_attack/slime_glomp)
|
||||
flags = IS_RESTRICTED | NO_BLOOD | NO_SCAN | NO_SLIP | NO_BREATHE
|
||||
flags = IS_RESTRICTED | NO_SCAN | NO_SLIP | NO_BREATHE
|
||||
siemens_coefficient = 3
|
||||
darksight = 3
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
else
|
||||
qdel(D)
|
||||
|
||||
H.visible_message("\red[H] splits apart with a wet slithering noise!")
|
||||
H.visible_message("<span class='danger'>[H] splits apart with a wet slithering noise!</span>")
|
||||
|
||||
/datum/species/machine
|
||||
name = "Machine"
|
||||
@@ -266,7 +266,10 @@
|
||||
virus_immune = 1
|
||||
reagent_tag = IS_MACHINE
|
||||
|
||||
has_organ = list() //TODO: Positronic brain.
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/mmi_holder/posibrain,
|
||||
"cell" = /obj/item/organ/cell
|
||||
)
|
||||
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/ipc),
|
||||
|
||||
@@ -26,38 +26,70 @@
|
||||
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue Body Temperature: ???", 1)
|
||||
return
|
||||
if(!istype(M, /mob/living/silicon/robot)) //todo add limb analysis
|
||||
|
||||
var/scan_type
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
scan_type = "robot"
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
scan_type = "prosthetics"
|
||||
else
|
||||
user << "\red You can't analyze non-robotic things!"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'> [user] has analyzed [M]'s components.","<span class='notice'> You have analyzed [M]'s components.")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
|
||||
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
|
||||
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>", 1)
|
||||
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
if(M.tod && M.stat == DEAD)
|
||||
user.show_message("\blue Time of Disable: [M.tod]")
|
||||
user.visible_message("<span class='notice'>\The [user] has analyzed [M]'s components.","<span class='notice'>You have analyzed [M]'s components.")
|
||||
switch(scan_type)
|
||||
if("robot")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
|
||||
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
|
||||
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>", 1)
|
||||
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
if(M.tod && M.stat == DEAD)
|
||||
user.show_message("\blue Time of Disable: [M.tod]")
|
||||
var/mob/living/silicon/robot/H = M
|
||||
var/list/damaged = H.get_damaged_components(1,1,1)
|
||||
user.show_message("\blue Localized Damage:",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/datum/robot_component/org in damaged)
|
||||
user.show_message(text("\blue \t []: [][] - [] - [] - []", \
|
||||
capitalize(org.name), \
|
||||
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
|
||||
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
|
||||
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
|
||||
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
|
||||
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
|
||||
else
|
||||
user.show_message("\blue \t Components are OK.",1)
|
||||
if(H.emagged && prob(5))
|
||||
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
|
||||
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
|
||||
if (istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/H = M
|
||||
var/list/damaged = H.get_damaged_components(1,1,1)
|
||||
user.show_message("\blue Localized Damage:",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/datum/robot_component/org in damaged)
|
||||
user.show_message(text("\blue \t []: [][] - [] - [] - []", \
|
||||
capitalize(org.name), \
|
||||
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
|
||||
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
|
||||
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
|
||||
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
|
||||
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
|
||||
else
|
||||
user.show_message("\blue \t Components are OK.",1)
|
||||
if(H.emagged && prob(5))
|
||||
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
|
||||
if("prosthetics")
|
||||
var/mob/living/carbon/human/H = M
|
||||
user << "<span class='notice'>Analyzing Results for \the [H]:</span>"
|
||||
user << "Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
|
||||
|
||||
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
user << "<span class='notice'>External prosthetics:</span>"
|
||||
var/organ_found
|
||||
if(H.internal_organs.len)
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
continue
|
||||
organ_found = 1
|
||||
user << "[E.name]: <font color='red'>[E.brute_dam]</font> <font color='#FFA500'>[E.burn_dam]</font>"
|
||||
if(!organ_found)
|
||||
user << "No prosthetics located."
|
||||
user << "<hr>"
|
||||
user << "<span class='notice'>Internal prosthetics:</span>"
|
||||
organ_found = null
|
||||
if(H.internal_organs.len)
|
||||
for(var/obj/item/organ/O in H.internal_organs)
|
||||
if(!(O.status & ORGAN_ROBOT))
|
||||
continue
|
||||
organ_found = 1
|
||||
user << "[O.name]: <font color='red'>[O.damage]</font>"
|
||||
if(!organ_found)
|
||||
user << "No prosthetics located."
|
||||
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user