diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 3d6ce2459ec..a4d429a655e 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -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 << "You need at least two rods to do this." 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("[user.name] shaped [src] into metal with the weldingtool.", \ + "You shaped [src] into metal with the weldingtool.", \ + "You hear welding.") var/obj/item/stack/rods/R = src src = null var/replace = (user.get_inactive_hand()==R) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 52f94679a42..4ad71cb9c93 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -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" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 56a78e1065c..4545936e722 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -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" diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 8482d4a7cd1..739c625cb54 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -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 diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 15aa4938875..32c04c5b6a7 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -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 diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm index 80c0a6919d1..ee9c5832f72 100644 --- a/code/game/objects/items/stacks/tiles/plasteel.dm +++ b/code/game/objects/items/stacks/tiles/plasteel.dm @@ -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 diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index c406a1bea1d..ed1535eb4d9 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -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 [user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.", \ "\red [user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.") 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 << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s." + qdel(src) + ..() /obj/item/weapon/shard/Crossed(AM as mob|obj) if(ismob(AM)) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index e5a3413bb2e..c107068955f 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -213,7 +213,7 @@ distance = 1 if (src.stat) msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n" - if((stat == 2 || src.health < config.health_threshold_crit) && distance <= 3) + if((stat == 2 || src.health <= config.health_threshold_crit) && distance <= 3) msg += "[t_He] does not appear to be breathing.\n" if(istype(usr, /mob/living/carbon/human) && !usr.stat && distance <= 1) for(var/mob/O in viewers(usr.loc, null)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 05e8bdd1ef9..328197ce46b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1680,3 +1680,6 @@ /mob/living/carbon/human/canBeHandcuffed() return 1 + +/mob/living/carbon/human/InCritical() + return (health <= config.health_threshold_crit && stat == UNCONSCIOUS) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index f56ee3a3cc7..a9bad50b27a 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 3877fa52634..6c2c876ef50 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -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) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index f1aa5bea66b..66eba695377 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -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) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 12e2c1bcacb..1cc651fdc32 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -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") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1a9a1e80f2c..9f228068ab3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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 << "You have given up life and succumbed to death." + death() +/mob/living/proc/InCritical() + return (src.health < 0 && src.health > -95.0 && stat == UNCONSCIOUS) /mob/living/proc/updatehealth() if(status_flags & GODMODE) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 2047ee7f965..9f54d762431 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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()]") diff --git a/sound/weapons/grenadelaunch.ogg b/sound/weapons/grenadelaunch.ogg new file mode 100644 index 00000000000..4662058f28a Binary files /dev/null and b/sound/weapons/grenadelaunch.ogg differ