mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Fixing blood spreading too much during surgery (#26266)
* bloody blood * ehhhh * here too * bloodwrite fix * a * review changes * max blood amount to argument * Update code/game/atoms.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/human_defense.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> * tab --------- Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
co-authored by
DGamerL
Burzah
parent
6032712fab
commit
fbe49dabbc
@@ -7,19 +7,14 @@
|
||||
G.transfer_blood--
|
||||
|
||||
if(blood_DNA && should_spread_blood)
|
||||
var/old_transfer_blood = G.transfer_blood
|
||||
G.add_blood(blood_DNA, blood_color)
|
||||
G.transfer_blood = max(1, old_transfer_blood)
|
||||
M.update_inv_gloves()
|
||||
M.make_bloody_hands(G.blood_DNA, G.blood_color, G.transfer_blood)
|
||||
|
||||
else
|
||||
if(M.bloody_hands > 1 && add_blood(M.blood_DNA, M.hand_blood_color))
|
||||
M.bloody_hands--
|
||||
|
||||
if(blood_DNA && should_spread_blood)
|
||||
var/old_bloody_hands = M.bloody_hands
|
||||
M.make_bloody_hands(blood_DNA, blood_color)
|
||||
M.bloody_hands = max(1, old_bloody_hands)
|
||||
M.make_bloody_hands(blood_DNA, blood_color, M.bloody_hands)
|
||||
|
||||
if(!suit_fibers) suit_fibers = list()
|
||||
var/fibertext
|
||||
|
||||
@@ -616,14 +616,27 @@ emp_act
|
||||
visible_message("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/make_bloody_hands(list/blood_dna, b_color)
|
||||
/*
|
||||
* This proc makes human hands bloody, if you touch something, you will leave a blood trace
|
||||
|
||||
* blood_dna: list of blood DNAs stored in each atom in blood_DNA variable or in get_blood_dna_list() on carbons
|
||||
* b_color: blood color, simple. If there will be null, the blood will be red, otherwise the color you pass
|
||||
* amount: amount of "blood charges" you want to give, that will be used to make items/walls bloody.
|
||||
You can make something bloody this amount - 1 times.
|
||||
If this variable will be null, amount will be set randomly from 2 to max_amount
|
||||
* max_amount: if amount is not set, amount will be random from 2 to this value, default 4
|
||||
*/
|
||||
/mob/living/carbon/human/proc/make_bloody_hands(list/blood_dna, b_color, amount, max_amount = 4)
|
||||
if(isnull(b_color))
|
||||
b_color = "#A10808"
|
||||
if(gloves)
|
||||
gloves.add_blood(blood_dna, blood_color)
|
||||
gloves.add_blood(blood_dna, blood_color, amount, max_amount)
|
||||
else
|
||||
hand_blood_color = b_color
|
||||
bloody_hands = rand(2, 4)
|
||||
if(isnull(amount))
|
||||
bloody_hands = rand(2, max_amount)
|
||||
else
|
||||
bloody_hands = max(1, amount)
|
||||
transfer_blood_dna(blood_dna)
|
||||
add_verb(src, /mob/living/carbon/human/proc/bloody_doodle)
|
||||
update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
|
||||
|
||||
@@ -1281,7 +1281,7 @@
|
||||
if(incapacitated())
|
||||
to_chat(src, "<span class='warning'>You can't write on the floor in your current state!</span>")
|
||||
return
|
||||
if(!bloody_hands)
|
||||
if(bloody_hands <= 1)
|
||||
remove_verb(src, /mob/living/carbon/human/proc/bloody_doodle)
|
||||
|
||||
if(gloves)
|
||||
@@ -1310,7 +1310,7 @@
|
||||
to_chat(src, "<span class='warning'>There is no space to write on!</span>")
|
||||
return
|
||||
|
||||
var/max_length = bloody_hands * 30 //tweeter style
|
||||
var/max_length = (bloody_hands - 1) * 30 //tweeter style
|
||||
|
||||
var/message = tgui_input_text(src, "Write a message. It cannot be longer than [max_length] characters.", "Blood writing", max_length = max_length)
|
||||
if(origin != loc)
|
||||
@@ -1318,7 +1318,7 @@
|
||||
return
|
||||
if(message)
|
||||
var/used_blood_amount = round(length(message) / 30, 1)
|
||||
bloody_hands = max(0, bloody_hands - used_blood_amount) //use up some blood
|
||||
bloody_hands = max(1, bloody_hands - used_blood_amount) //use up some blood
|
||||
|
||||
if(length(message) > max_length)
|
||||
message += "-"
|
||||
|
||||
@@ -278,7 +278,10 @@
|
||||
drop.overlays |= I
|
||||
|
||||
drop.transfer_mob_blood_dna(src)
|
||||
drop.basecolor = b_data["blood_color"]
|
||||
if(b_data && !isnull(b_data["blood_color"]))
|
||||
drop.basecolor = b_data["blood_color"]
|
||||
else
|
||||
drop.basecolor = "#A10808"
|
||||
drop.update_icon()
|
||||
else
|
||||
temp_blood_DNA = list()
|
||||
@@ -287,7 +290,10 @@
|
||||
else
|
||||
drop = new(T)
|
||||
drop.transfer_mob_blood_dna(src)
|
||||
drop.basecolor = b_data["blood_color"]
|
||||
if(b_data && !isnull(b_data["blood_color"]))
|
||||
drop.basecolor = b_data["blood_color"]
|
||||
else
|
||||
drop.basecolor = "#A10808"
|
||||
drop.update_icon()
|
||||
if(emittor_intertia)
|
||||
drop.newtonian_move(emittor_intertia)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
affected.fix_internal_bleeding()
|
||||
if(ishuman(user) && prob(40))
|
||||
var/mob/living/carbon/human/U = user
|
||||
U.make_bloody_hands(target.get_blood_dna_list(), target.get_blood_color())
|
||||
U.make_bloody_hands(target.get_blood_dna_list(), target.get_blood_color(), 0)
|
||||
|
||||
return SURGERY_STEP_CONTINUE
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
switch(blood_level)
|
||||
if(SURGERY_BLOODSPREAD_HANDS)
|
||||
target.visible_message("<span class='notice'>Blood splashes onto [user]'s hands.</span>")
|
||||
H.make_bloody_hands(target.get_blood_dna_list(), target.get_blood_color())
|
||||
H.make_bloody_hands(target.get_blood_dna_list(), target.get_blood_color(), 0)
|
||||
if(SURGERY_BLOODSPREAD_FULLBODY)
|
||||
target.visible_message("<span class='notice'>A spray of blood coats [user].</span>")
|
||||
H.bloody_body(target)
|
||||
|
||||
Reference in New Issue
Block a user