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:
SkyMarshal
2012-02-17 11:39:26 -07:00
parent eaf198539f
commit b0eebb2edb
10 changed files with 59 additions and 56 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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 :(

View File

@@ -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))

View File

@@ -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