mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Health and Stack Fixes
This commit is contained in:
@@ -1,42 +1,46 @@
|
||||
/obj/item/stack/rods
|
||||
name = "metal rods"
|
||||
name = "metal rod"
|
||||
desc = "Some rods. Can be used for building, or something."
|
||||
singular_name = "metal rod"
|
||||
icon_state = "rods"
|
||||
item_state = "rods"
|
||||
flags = CONDUCT
|
||||
w_class = 3.0
|
||||
force = 9.0
|
||||
throwforce = 15.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
m_amt = 1875
|
||||
throwforce = 10.0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
m_amt = 1000
|
||||
max_amount = 60
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
|
||||
/obj/item/stack/rods/New(var/loc, var/amount=null)
|
||||
..()
|
||||
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
if(get_amount() <= 5)
|
||||
icon_state = "rods-[get_amount()]"
|
||||
var/amount = get_amount()
|
||||
if((amount <= 5) && (amount > 0))
|
||||
icon_state = "rods-[amount]"
|
||||
else
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(amount < 2)
|
||||
user << "\red You need at least two rods to do this."
|
||||
if(get_amount() < 2)
|
||||
user << "<span class='warning'>You need at least two rods to do this.</span>"
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
||||
new_item.add_to_stacks(usr)
|
||||
for (var/mob/M in viewers(src))
|
||||
M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2)
|
||||
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==R)
|
||||
|
||||
@@ -77,7 +77,7 @@ obj/item/stack/sheet/mineral/iron
|
||||
origin_tech = "materials=1"
|
||||
sheettype = "iron"
|
||||
color = "#333333"
|
||||
perunit = 3750
|
||||
perunit = 2000
|
||||
|
||||
obj/item/stack/sheet/mineral/iron/New()
|
||||
..()
|
||||
@@ -88,7 +88,7 @@ obj/item/stack/sheet/mineral/iron/New()
|
||||
desc = "This appears to be a combination of both sand and stone."
|
||||
singular_name = "sandstone brick"
|
||||
icon_state = "sheet-sandstone"
|
||||
throw_speed = 4
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
origin_tech = "materials=1"
|
||||
sheettype = "sandstone"
|
||||
@@ -101,7 +101,7 @@ obj/item/stack/sheet/mineral/iron/New()
|
||||
name = "diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
origin_tech = "materials=6"
|
||||
perunit = 3750
|
||||
perunit = 2000
|
||||
sheettype = "diamond"
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
singular_name = "metal sheet"
|
||||
icon_state = "sheet-metal"
|
||||
m_amt = 3750
|
||||
throwforce = 14.0
|
||||
throwforce = 10.0
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=1"
|
||||
|
||||
@@ -88,7 +88,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
singular_name = "metal sheet"
|
||||
icon_state = "sheet-metal"
|
||||
m_amt = 0
|
||||
throwforce = 14.0
|
||||
throwforce = 10.0
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||
@@ -115,7 +115,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
icon_state = "sheet-plasteel"
|
||||
item_state = "sheet-metal"
|
||||
m_amt = 7500
|
||||
throwforce = 15.0
|
||||
throwforce = 10.0
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=2"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
force = 5
|
||||
throwforce = 5
|
||||
max_amount = 50
|
||||
throw_speed = 3
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
||||
var/perunit = MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
@@ -184,9 +184,9 @@
|
||||
continue
|
||||
oldsrc.attackby(item, usr)
|
||||
usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s."
|
||||
if(!oldsrc)
|
||||
if(oldsrc.amount <= 0)
|
||||
break
|
||||
update_icon()
|
||||
oldsrc.update_icon()
|
||||
|
||||
/obj/item/stack/proc/get_amount()
|
||||
return amount
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
w_class = 3.0
|
||||
force = 6.0
|
||||
m_amt = 937.5
|
||||
throwforce = 15.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
throwforce = 10.0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
max_amount = 60
|
||||
|
||||
|
||||
@@ -7,33 +7,19 @@
|
||||
sharp = 1
|
||||
edge = 1
|
||||
desc = "Could probably be used as ... a throwing weapon?"
|
||||
w_class = 2.0
|
||||
w_class = 1.0
|
||||
force = 5.0
|
||||
throwforce = 8.0
|
||||
throwforce = 10.0
|
||||
item_state = "shard-glass"
|
||||
// matter = list("glass" = 3750)
|
||||
g_amt = MINERAL_MATERIAL_AMOUNT
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/shard/suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Bump()
|
||||
|
||||
spawn( 0 )
|
||||
if (prob(20))
|
||||
src.force = 15
|
||||
else
|
||||
src.force = 4
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/New()
|
||||
|
||||
src.icon_state = pick("large", "medium", "small")
|
||||
@@ -50,23 +36,20 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G==NG)
|
||||
for(var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G == NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
if(G.amount >= G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user, params)
|
||||
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return ..()
|
||||
G.attackby(NG, user)
|
||||
user << "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>"
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/shard/Crossed(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
distance = 1
|
||||
if (src.stat)
|
||||
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
|
||||
if((stat == 2 || src.health < config.health_threshold_crit) && distance <= 3)
|
||||
if((stat == 2 || src.health <= config.health_threshold_crit) && distance <= 3)
|
||||
msg += "<span class='warning'>[t_He] does not appear to be breathing.</span>\n"
|
||||
if(istype(usr, /mob/living/carbon/human) && !usr.stat && distance <= 1)
|
||||
for(var/mob/O in viewers(usr.loc, null))
|
||||
|
||||
@@ -1680,3 +1680,6 @@
|
||||
|
||||
/mob/living/carbon/human/canBeHandcuffed()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/InCritical()
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
@@ -735,7 +735,7 @@ It can still be worn/put on as normal.
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
if("CPR")
|
||||
if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit))
|
||||
if ((target.health > config.health_threshold_dead && target.health <= config.health_threshold_crit))
|
||||
var/suff = min(target.getOxyLoss(), 7)
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.updatehealth()
|
||||
|
||||
@@ -397,7 +397,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < config.health_threshold_crit)
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
@@ -1051,7 +1051,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
analgesic = max(0, analgesic - 1)
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
|
||||
Paralyse(3)
|
||||
|
||||
/* Done by handle_breath()
|
||||
@@ -1638,7 +1638,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily
|
||||
|
||||
if(health < 0)// health 0 makes you immediately collapse
|
||||
if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse
|
||||
shock_stage = max(shock_stage, 61)
|
||||
|
||||
if(traumatic_shock >= 100)
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
death()
|
||||
return
|
||||
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
else if(src.health <= config.health_threshold_crit)
|
||||
|
||||
if(!src.reagents.has_reagent("inaprovaline"))
|
||||
src.adjustOxyLoss(10)
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit > health) )
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
|
||||
@@ -23,11 +23,15 @@
|
||||
*/
|
||||
/mob/living/verb/succumb()
|
||||
set hidden = 1
|
||||
if ((src.health < 0 && src.health > -95.0))
|
||||
src.adjustOxyLoss(src.health + 200)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
src << "\blue You have given up life and succumbed to death."
|
||||
if (InCritical())
|
||||
src.attack_log += "[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!"
|
||||
src.adjustOxyLoss(src.health - config.health_threshold_dead)
|
||||
updatehealth()
|
||||
src << "<span class='notice'>You have given up life and succumbed to death.</span>"
|
||||
death()
|
||||
|
||||
/mob/living/proc/InCritical()
|
||||
return (src.health < 0 && src.health > -95.0 && stat == UNCONSCIOUS)
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -757,12 +757,13 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/pull_damage()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.health - H.halloss <= config.health_threshold_crit)
|
||||
if(H.health - H.halloss <= config.health_threshold_softcrit)
|
||||
for(var/name in H.organs_by_name)
|
||||
var/datum/organ/external/e = H.organs_by_name[name]
|
||||
if((H.lying) && ((e.status & ORGAN_BROKEN && !(e.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
|
||||
return 1
|
||||
break
|
||||
if(H.lying)
|
||||
if(((e.status & ORGAN_BROKEN && !(e.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
|
||||
return 1
|
||||
break
|
||||
return 0
|
||||
|
||||
/mob/MouseDrop(mob/M as mob)
|
||||
@@ -902,7 +903,7 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
process = processScheduler.getProcess("obj")
|
||||
stat(null, "OBJ([processing_objects.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
|
||||
process = processScheduler.getProcess("bot")
|
||||
stat(null, "BOT([aibots.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user