mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Reverted some layer adjustments I did that seem to have broken things, bugfixes for operating tables, choking people, and CPR, giving. Also added sterile mask box sprite, and tossed the singularity crap into a spawn(0) to try and reduce lag.
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
icon_state = "wardrobe_sealed"
|
||||
item_state = "wardrobe"
|
||||
w_class = 4
|
||||
layer = 2.9
|
||||
var
|
||||
descriptor = "various clothing"
|
||||
seal_torn = 0
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
var/health = 100 //Might be a bit much, dono can always change later //Nerfed -Pete
|
||||
var/lastbang //
|
||||
var/lasttry = 0
|
||||
layer = 2.8
|
||||
|
||||
/obj/structure/closet/detective
|
||||
name = "Detective's Closet"
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
/obj/item/weapon/storage/stma_kit
|
||||
name = "Sterile Masks"
|
||||
desc = "This box contains masks of +2 constitution." //I made it better. --SkyMarshal
|
||||
icon_state = "latex"
|
||||
icon_state = "mask"
|
||||
item_state = "syringe_kit"
|
||||
|
||||
/obj/item/weapon/storage/trackimp_kit
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
if(id)
|
||||
if(!isnull(id))
|
||||
for(var/obj/machinery/computer/operating/O in world)
|
||||
if(src.id == O.id)
|
||||
src.computer = O
|
||||
@@ -94,11 +94,13 @@
|
||||
if(locate(/mob/living/carbon, src.loc))
|
||||
var/mob/M = locate(/mob/living/carbon, src.loc)
|
||||
if(M.resting)
|
||||
src.victim = M
|
||||
victim = M
|
||||
if(updatesicon)
|
||||
icon_state = "table2-active"
|
||||
return 1
|
||||
src.victim = null
|
||||
if(victim)
|
||||
victim.update_clothing()
|
||||
victim = null
|
||||
if(updatesicon)
|
||||
icon_state = "table2-idle"
|
||||
processing_objects.Remove(src)
|
||||
@@ -124,6 +126,7 @@
|
||||
if(updatesicon)
|
||||
icon_state = "table2-active"
|
||||
src.victim = M
|
||||
M.update_clothing()
|
||||
processing_objects.Add(src)
|
||||
del(W)
|
||||
return
|
||||
@@ -133,7 +136,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/optable/portable
|
||||
name = "mobile operating Table"
|
||||
name = "mobile operating table"
|
||||
desc = "Used for advanced medical procedures. Seems to be movable, neat."
|
||||
icon = 'rollerbed.dmi'
|
||||
icon_state = "up"
|
||||
|
||||
@@ -20,12 +20,6 @@ mob/living/carbon/verb/give()
|
||||
I = usr.r_hand
|
||||
if(!I)
|
||||
return
|
||||
var/obj/item/weapon/T = new(usr.loc)
|
||||
if(!src.loc.Enter(T))
|
||||
usr << "Can't reach him"
|
||||
del(T)
|
||||
return
|
||||
del(T)
|
||||
if(src.r_hand == null)
|
||||
switch(alert(src,"[usr.name] wants to give you \a [I.name]?",,"Yes","No"))
|
||||
if("Yes")
|
||||
@@ -42,11 +36,13 @@ mob/living/carbon/verb/give()
|
||||
usr.drop_item(I)
|
||||
src.l_hand = I
|
||||
else
|
||||
src << "Your hands are full."
|
||||
usr << "Their hands are full."
|
||||
return
|
||||
else
|
||||
usr.drop_item(I)
|
||||
src.r_hand = I
|
||||
usr.client.screen -= I
|
||||
I.loc = src
|
||||
I.layer = 20
|
||||
I.add_fingerprint(src)
|
||||
@@ -71,11 +67,13 @@ mob/living/carbon/verb/give()
|
||||
usr.drop_item(I)
|
||||
src.r_hand = I
|
||||
else
|
||||
src << "Your hands are full."
|
||||
usr << "Their hands are full."
|
||||
return
|
||||
else
|
||||
usr.drop_item(I)
|
||||
src.l_hand = I
|
||||
usr.client.screen -= I
|
||||
I.loc = src
|
||||
I.layer = 20
|
||||
I.add_fingerprint(src)
|
||||
|
||||
@@ -1584,7 +1584,7 @@
|
||||
return
|
||||
message = text("\red <B>[] is trying to empty []'s pockets!!</B>", source, target)
|
||||
if("CPR")
|
||||
if (target.cpr_time >= world.time + 3)
|
||||
if (target.cpr_time + 3 >= world.time)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
@@ -2045,14 +2045,15 @@ It can still be worn/put on as normal.
|
||||
target.handcuffed = item
|
||||
item.loc = target
|
||||
if("CPR")
|
||||
if (target.cpr_time >= world.time + 30)
|
||||
if (target.cpr_time + 30 >= world.time)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if ((target.health >= -99.0 && target.health < config.health_threshold_dead))
|
||||
if ((target.health >= -99.0 && target.stat == 1))
|
||||
target.cpr_time = world.time
|
||||
var/suff = min(target.getOxyLoss(), 7)
|
||||
target.oxyloss -= suff
|
||||
target.losebreath = 0
|
||||
target.updatehealth()
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message(text("\red [] performs CPR on []!", source, target), 1)
|
||||
|
||||
@@ -118,17 +118,18 @@
|
||||
proc
|
||||
handle_health_updates()
|
||||
// if the mob has enough health, she should slowly heal
|
||||
if(health >= 0)
|
||||
var/pr = 10
|
||||
if(stat == 1) // sleeping means faster healing
|
||||
pr += 5
|
||||
if(prob(pr))
|
||||
heal_organ_damage(1,1)
|
||||
adjustToxLoss(-1)
|
||||
else if(health < 0)
|
||||
var/pr = 80
|
||||
if(prob(pr))
|
||||
adjustToxLoss(1)
|
||||
if(stat != 2)
|
||||
if(health >= 0)
|
||||
var/pr = 10
|
||||
if(stat == 1) // sleeping means faster healing
|
||||
pr += 5
|
||||
if(prob(pr))
|
||||
heal_organ_damage(1,1)
|
||||
adjustToxLoss(-1)
|
||||
else if(health < 0)
|
||||
var/pr = 50
|
||||
if(prob(pr))
|
||||
adjustToxLoss(1)
|
||||
|
||||
clamp_values()
|
||||
|
||||
@@ -275,23 +276,23 @@
|
||||
var/datum/air_group/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < config.health_threshold_dead)
|
||||
losebreath++
|
||||
isbreathing = 0
|
||||
spawn emote("stopbreath")
|
||||
|
||||
if(holdbreath)
|
||||
isbreathing = 0
|
||||
|
||||
if(isbreathing)
|
||||
// are we running out of air in our lungs?
|
||||
if(losebreath > 0)
|
||||
// inaprovaline prevents the need to breathe for a while
|
||||
if(reagents.has_reagent("inaprovaline"))
|
||||
losebreath = 0
|
||||
else
|
||||
// we're running out of air, gasp for it!
|
||||
if (prob(25)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
else if(health >= 0)
|
||||
if(losebreath > 0)
|
||||
// inaprovaline prevents the need to breathe for a while
|
||||
if(reagents.has_reagent("inaprovaline"))
|
||||
losebreath = 0
|
||||
else
|
||||
losebreath--
|
||||
// we're running out of air, gasp for it!
|
||||
if (prob(25)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
isbreathing = 0
|
||||
else if(health >= 0 && !isbreathing)
|
||||
if(holdbreath)
|
||||
// we're simply holding our breath, see if we can hold it longer
|
||||
if(health < 30)
|
||||
@@ -457,6 +458,7 @@
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
SA.moles = 0 //Hack to stop the damned surgeon from giggling.
|
||||
|
||||
|
||||
if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :(
|
||||
|
||||
@@ -85,16 +85,17 @@ var/global/list/uneatable = list(
|
||||
|
||||
|
||||
process()
|
||||
eat()
|
||||
dissipate()
|
||||
check_energy()
|
||||
if(current_size >= 3)
|
||||
move()
|
||||
if(current_size <= 7)
|
||||
pulse()
|
||||
if(current_size >= 5)
|
||||
if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit
|
||||
event()
|
||||
spawn(0)
|
||||
eat()
|
||||
dissipate()
|
||||
check_energy()
|
||||
if(current_size >= 3)
|
||||
move()
|
||||
if(current_size <= 7)
|
||||
pulse()
|
||||
if(current_size >= 5)
|
||||
if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit
|
||||
event()
|
||||
return
|
||||
|
||||
|
||||
@@ -442,12 +443,13 @@ var/global/list/uneatable = list(
|
||||
consume_range = 3 //How many tiles out do we eat
|
||||
|
||||
process()
|
||||
eat()
|
||||
if(!target || prob(5))
|
||||
pickcultist()
|
||||
move()
|
||||
if(prob(25))
|
||||
mezzer()
|
||||
spawn(0)
|
||||
eat()
|
||||
if(!target || prob(5))
|
||||
pickcultist()
|
||||
move()
|
||||
if(prob(25))
|
||||
mezzer()
|
||||
|
||||
consume(var/atom/A) //Has its own consume proc because it doesn't need energy and I don't want BoHs to explode it. --NEO
|
||||
if(is_type_in_list(A, uneatable))
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
name = "conveyor belt"
|
||||
desc = "A conveyor belt."
|
||||
anchored = 1
|
||||
layer = 2.7
|
||||
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
|
||||
var/operable = 1 // true if can operate (no broken segments in this belt run)
|
||||
var/forwards // this is the default (forward) direction, set by the map dir, can be 0
|
||||
|
||||
Reference in New Issue
Block a user