mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Mob life fix, firedoors
This commit does the following;
- Repairs mob breathing by adding a new ticker process, mob_master, as
air_master is an unreliable ticker with it's customizable speed
- Restore firedoor attack_hand access
- You can now open and close firedoors by using no item, provided you
have access to them and they aren't locked.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
//First, resolve location and get a breath
|
||||
|
||||
if(air_master.current_cycle%4==2)
|
||||
if(mob_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
spawn(0) breathe()
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
amount_grown++
|
||||
|
||||
//First, resolve location and get a breath
|
||||
if(air_master.current_cycle%4==2)
|
||||
if(mob_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
spawn(0) breathe()
|
||||
else //Still give containing object the chance to interact
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
stomach_contents.Remove(M)
|
||||
qdel(M)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(mob_master.current_cycle%3==1)
|
||||
if(!(M.status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
@@ -74,7 +74,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
//No need to update all of these procs if the guy is dead.
|
||||
if(stat != DEAD && !in_stasis)
|
||||
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
|
||||
if(mob_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
|
||||
breathe() //Only try to take a breath every 4 ticks, unless suffocating
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
@@ -1412,7 +1412,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
stomach_contents.Remove(M)
|
||||
del(M)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(mob_master.current_cycle%3==1)
|
||||
if(!(M.status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if (stat != DEAD)
|
||||
if(!istype(src,/mob/living/carbon/monkey/diona)) //still breathing
|
||||
//First, resolve location and get a breath
|
||||
if(air_master.current_cycle%4==2)
|
||||
if(mob_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
breathe()
|
||||
else //Still give containing object the chance to interact
|
||||
|
||||
@@ -221,6 +221,7 @@
|
||||
if(H.reagents)
|
||||
H.reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
H.toxins_alert = max(H.toxins_alert, 1)
|
||||
|
||||
else if(O2_pp > vox_oxygen_max && name == "Vox") //Oxygen is toxic to vox.
|
||||
var/ratio = (breath.oxygen/vox_oxygen_max) * 1000
|
||||
H.adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
|
||||
Reference in New Issue
Block a user