mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Merge pull request #15098 from KazeEspada/BLOWINGSAFE
You can now blow open secure storage containers
This commit is contained in:
@@ -69,10 +69,16 @@
|
||||
/obj/item/weapon/c4/afterattack(atom/movable/AM, mob/user, flag)
|
||||
if (!flag)
|
||||
return
|
||||
if (ismob(AM) || istype(AM, /obj/item/weapon/storage/))
|
||||
if (ismob(AM))
|
||||
return
|
||||
if(loc == AM)
|
||||
return
|
||||
if((istype(AM, /obj/item/weapon/storage/)) && !((istype(AM, /obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))) //If its storage but not secure storage OR a lockbox, then place it inside.
|
||||
return
|
||||
if((istype(AM,/obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))
|
||||
var/obj/item/weapon/storage/secure/S = AM
|
||||
if(!S.locked) //Literal hacks, this works for lockboxes despite incorrect type casting, because they both share the locked var. But if its unlocked, place it inside, otherwise PLANTING C4!
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start planting the bomb...</span>"
|
||||
|
||||
|
||||
@@ -470,8 +470,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/storage/Destroy()
|
||||
for(var/obj/O in contents)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
var/turf = get_turf(src)
|
||||
empty_object_contents(0, turf)
|
||||
|
||||
close_all()
|
||||
qdel(boxes)
|
||||
|
||||
Reference in New Issue
Block a user