mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
Toolbox and Sprint Tweaks (#1098)
New feature! Toolboxes that are full of tools hit much harder, stun, and make a satisfying thunk. But they'll spill their contents everywhere, it's a one-shot thing Fixes unathi being able to spam devour, and eat through faceplates Slightly buffs IPC sprinting as requested by cake
This commit is contained in:
@@ -459,13 +459,13 @@
|
||||
max_storage_space += I.get_storage_cost()
|
||||
|
||||
//Useful for spilling the contents of containers all over the floor
|
||||
/obj/item/weapon/storage/proc/spill()
|
||||
if (istype(loc, /turf))//If its not on the floor this might cause issues
|
||||
var/turf/T = get_turf(src)
|
||||
for (var/obj/O in contents)
|
||||
contents.Remove(O)
|
||||
O.forceMove(T)
|
||||
O.tumble(2)
|
||||
/obj/item/weapon/storage/proc/spill(var/dist = 2, var/turf/T = null)
|
||||
if (!T || !istype(T, /turf))//If its not on the floor this might cause issues
|
||||
T = get_turf(src)
|
||||
|
||||
for (var/obj/O in contents)
|
||||
remove_from_storage(O, T)
|
||||
O.tumble(2)
|
||||
|
||||
|
||||
//Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area).
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
max_storage_space = 14 //can hold 7 w_class-2 items or up to 3 w_class-3 items (with 1 w_class-2 item as change).
|
||||
origin_tech = "combat=1"
|
||||
attack_verb = list("robusted")
|
||||
var/stunhit = 0
|
||||
|
||||
/obj/item/weapon/storage/toolbox/initialize()
|
||||
spawn(3)
|
||||
update_force()
|
||||
|
||||
/obj/item/weapon/storage/toolbox/emergency
|
||||
name = "emergency toolbox"
|
||||
@@ -80,3 +85,24 @@
|
||||
new /obj/item/stack/cable_coil(src,30,color)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/toolbox/proc/update_force()
|
||||
force = initial(force)
|
||||
for (var/obj/item/I in contents)
|
||||
force += I.w_class*1.5
|
||||
|
||||
/obj/item/weapon/storage/toolbox/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
||||
if (..(W, prevent_warning))
|
||||
update_force()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/toolbox/attack(mob/living/M as mob, mob/user as mob)
|
||||
update_force()
|
||||
..(M, user)
|
||||
if (contents.len)
|
||||
spill(3, get_turf(M))
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 100, 1) //sound playin' again
|
||||
update_force()
|
||||
user.visible_message(span("danger", "[user] smashes the [src] into [M], causing it to break open and strew its contents across the area"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user