Skip to content

Commit

Permalink
heat,kidneys,organs and operation
Browse files Browse the repository at this point in the history
мелкие исправления то тут, то там. И сердце теперь кровоточит. Ура.
  • Loading branch information
TriflesChase committed Dec 25, 2024
1 parent 3660134 commit e0b13b5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 28 deletions.
9 changes: 4 additions & 5 deletions code/modules/surgery/organs/heart.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
if(!owner)
return

if(!owner.species.flags[NO_BLOOD] && owner.bodytemperature >= 170 || owner.stat == DEAD || !owner)
if(owner.species.flags[NO_BLOOD] || owner.bodytemperature < 170 || owner.stat == DEAD || !owner)
return

if(owner.reagents.has_reagent("metatrombine"))
Expand Down Expand Up @@ -160,18 +160,18 @@
if(PULSE_THREADY)
blood_max *= 1.8

if(reagents.has_reagent("inaprovaline"))
if(owner.reagents.has_reagent("inaprovaline"))
blood_max *= 0.8

if(!isturf(loc)) // No floor to drip on
if(!isturf(owner.loc)) // No floor to drip on
owner.blood_remove(blood_max)
return

if(world.time >= next_blood_squirt && do_spray.len) // It becomes very spammy otherwise. Arterial bleeding will still happen outside of this block, just not the squirt effect.
if(prob(50)) // added 50 prob for message and halved delay between squit effects (difference between us and Bay12), lets see how this will be on live server.
visible_message("<span class='danger'>Blood squirts from [pick(do_spray)]!</span>")
next_blood_squirt = world.time + 50
var/turf/sprayloc = get_turf(src)
var/turf/sprayloc = get_turf(owner)
var/third = CEIL(blood_max / 3)
owner.drip(third, sprayloc)
blood_max -= third
Expand Down Expand Up @@ -237,7 +237,6 @@
icon_state = "heart-prosthetic"
item_state_world = "heart-prosthetic_world"
base_icon_state = "heart-prosthetic"
dead_icon = "heart-prosthetic-off"
status = ORGAN_ROBOT
compability = list(VOX, HUMAN, PLUVIAN, UNATHI, TAJARAN, SKRELL)

Expand Down
37 changes: 19 additions & 18 deletions code/modules/surgery/organs/kidneys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,23 @@


/obj/item/organ/internal/kidneys/ipc/process()
if(owner.nutrition < 1)
return
if(next_warning > world.time)
return
next_warning = world.time + 10 SECONDS

var/damage_report = ""
var/first = TRUE

for(var/obj/item/organ/internal/IO in owner.organs)
if(IO.is_bruised())
if(!first)
damage_report += "\n"
first = FALSE
damage_report += "<span class='warning'><b>%[uppertext(IO.name)]%</b> INJURY DETECTED. CEASE DAMAGE TO <b>%[uppertext(IO.name)]%</b>. REQUEST ASSISTANCE.</span>"

if(damage_report != "")
to_chat(owner, damage_report)
if(!owner)
if(owner.nutrition < 1)
return
if(next_warning > world.time)
return
next_warning = world.time + 10 SECONDS

var/damage_report = ""
var/first = TRUE

for(var/obj/item/organ/internal/IO in owner.organs)
if(IO.is_bruised())
if(!first)
damage_report += "\n"
first = FALSE
damage_report += "<span class='warning'><b>%[uppertext(IO.name)]%</b> INJURY DETECTED. CEASE DAMAGE TO <b>%[uppertext(IO.name)]%</b>. REQUEST ASSISTANCE.</span>"

if(damage_report != "")
to_chat(owner, damage_report)

2 changes: 1 addition & 1 deletion code/modules/surgery/organs/organ.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
owner.organs -= src

loc = get_turf(owner)
STOP_PROCESSING(SSobj, src)
START_PROCESSING(SSobj, src)

if(owner && vital) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead
owner.death()
Expand Down
2 changes: 0 additions & 2 deletions code/modules/surgery/organs/organ_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

var/tough = FALSE //can organ be easily die?

var/dead_icon

var/list/compability = list(HUMAN, PLUVIAN, UNATHI, TAJARAN, SKRELL) // races with which organs are compatible

/obj/item/organ/internal/New(mob/living/carbon/holder)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/surgery/organs_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
if(IO.status & ORGAN_DEAD)
embed_organs += embed_organ
if(!embed_organs)
user.visible_message("<span class='warning'>The [BP] seems to already be in fine condition!")
user.visible_message("<span class='warning'>The [BP.name] seems to already be in fine condition!")
return

user.visible_message(
Expand All @@ -204,7 +204,7 @@
embed_organs[embed_organ] = image(icon = embed_organ.icon, icon_state = initial(embed_organ.icon_state))
var/choosen_organ = show_radial_menu(user, target, embed_organs, radius = 50, require_near = TRUE, tooltips = TRUE)
if(!choosen_organ)
user.visible_message("<span class='warning'>The [BP] seems to already be in fine condition!")
user.visible_message("<span class='warning'>The [BP.name] seems to already be in fine condition!")
return

var/obj/item/organ/internal/IO = choosen_organ
Expand Down

0 comments on commit e0b13b5

Please sign in to comment.