mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Merge remote-tracking branch 'upstream/master' into departmental-clothing-vendors
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
icon_state = "explosive"
|
||||
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate/always)
|
||||
var/detonating = FALSE
|
||||
var/weak = 2
|
||||
var/medium = 0.8
|
||||
var/heavy = 0.4
|
||||
@@ -26,16 +27,20 @@
|
||||
activate("death")
|
||||
|
||||
/obj/item/implant/explosive/activate(cause)
|
||||
if(!cause || !imp_in) return 0
|
||||
if(!cause || !imp_in)
|
||||
return FALSE
|
||||
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes")
|
||||
return 0
|
||||
return FALSE
|
||||
if(detonating)
|
||||
return FALSE
|
||||
heavy = round(heavy)
|
||||
medium = round(medium)
|
||||
weak = round(weak)
|
||||
to_chat(imp_in, "<span class='notice'>You activate your microbomb implant.</span>")
|
||||
detonating = TRUE
|
||||
to_chat(imp_in, "<span class='danger'>You activate your microbomb implant.</span>")
|
||||
//If the delay is short, just blow up already jeez
|
||||
if(delay <= 7)
|
||||
explosion(src,heavy,medium,weak,weak, flame_range = weak)
|
||||
explosion(src, heavy, medium, weak, weak, flame_range = weak)
|
||||
if(imp_in)
|
||||
imp_in.gib()
|
||||
qdel(src)
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
return
|
||||
if(istype(W, /obj/item))
|
||||
var/obj/item/IW = W
|
||||
if(IW.flags & (ABSTRACT | NODROP | DROPDEL))
|
||||
to_chat(user, "<span class='warning'>You can't put [IW] into [src]!</span>")
|
||||
return
|
||||
if((loadedWeightClass + IW.w_class) > maxWeightClass)
|
||||
to_chat(user, "<span class='warning'>\The [IW] won't fit into \the [src]!</span>")
|
||||
return
|
||||
|
||||
@@ -584,3 +584,9 @@
|
||||
name = "emergency response team janitor backpack"
|
||||
desc = "A spacious backpack with lots of pockets, worn by janitorial members of a Nanotrasen Emergency Response Team."
|
||||
icon_state = "ert_janitor"
|
||||
|
||||
//Solgov
|
||||
/obj/item/storage/backpack/ert/solgov
|
||||
name = "\improper TSF marine backpack"
|
||||
desc = "A spacious backpack with lots of pockets, worn by marines of the Trans-Solar Federation."
|
||||
icon_state = "ert_solgov"
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
/// No message on putting items in.
|
||||
var/silent = FALSE
|
||||
/// List of objects which this item can store (if set, it can't store anything else)
|
||||
var/list/can_hold = new/list()
|
||||
var/list/can_hold = list()
|
||||
/// List of objects which this item can't store (in effect only if can_hold isn't set)
|
||||
var/list/cant_hold = new/list()
|
||||
var/list/cant_hold = list()
|
||||
/// Max size of objects that this object can store (in effect only if can_hold isn't set)
|
||||
var/max_w_class = WEIGHT_CLASS_SMALL
|
||||
/// The sum of the w_classes of all the items in this storage item.
|
||||
@@ -42,6 +42,9 @@
|
||||
/// How much of the stack item do you get.
|
||||
var/foldable_amt = 0
|
||||
|
||||
/// Lazy list of mobs which are currently viewing the storage inventory.
|
||||
var/list/mobs_viewing
|
||||
|
||||
/obj/item/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
can_hold = typecacheof(can_hold)
|
||||
@@ -73,6 +76,15 @@
|
||||
closer.plane = ABOVE_HUD_PLANE
|
||||
orient2hud()
|
||||
|
||||
/obj/item/storage/Destroy()
|
||||
for(var/obj/O in contents)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
|
||||
QDEL_NULL(boxes)
|
||||
QDEL_NULL(closer)
|
||||
LAZYCLEARLIST(mobs_viewing)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/MouseDrop(obj/over_object)
|
||||
if(!ismob(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
return
|
||||
@@ -177,11 +189,13 @@
|
||||
user.client.screen += closer
|
||||
user.client.screen += contents
|
||||
user.s_active = src
|
||||
LAZYADDOR(mobs_viewing, user)
|
||||
|
||||
/**
|
||||
* Hides the current container interface from `user`.
|
||||
*/
|
||||
/obj/item/storage/proc/hide_from(mob/user)
|
||||
LAZYREMOVE(mobs_viewing, user) // Remove clientless mobs too
|
||||
if(!user.client)
|
||||
return
|
||||
user.client.screen -= boxes
|
||||
@@ -190,6 +204,16 @@
|
||||
if(user.s_active == src)
|
||||
user.s_active = null
|
||||
|
||||
/**
|
||||
* Checks all mobs currently viewing the storage inventory, and hides it if they shouldn't be able to see it.
|
||||
*/
|
||||
/obj/item/storage/proc/update_viewers()
|
||||
for(var/_M in mobs_viewing)
|
||||
var/mob/M = _M
|
||||
if(!QDELETED(M) && M.s_active == src && (M in range(1, loc)))
|
||||
continue
|
||||
hide_from(M)
|
||||
|
||||
/obj/item/storage/proc/open(mob/user)
|
||||
if(use_sound)
|
||||
playsound(loc, use_sound, 50, TRUE, -5)
|
||||
@@ -374,6 +398,12 @@
|
||||
prevent_warning = TRUE
|
||||
I.forceMove(src)
|
||||
I.on_enter_storage(src)
|
||||
|
||||
for(var/_M in mobs_viewing)
|
||||
var/mob/M = _M
|
||||
if((M.s_active == src) && M.client)
|
||||
M.client.screen += I
|
||||
|
||||
if(usr)
|
||||
if(usr.client && usr.s_active != src)
|
||||
usr.client.screen -= I
|
||||
@@ -412,7 +442,8 @@
|
||||
var/obj/item/storage/fancy/F = src
|
||||
F.update_icon(TRUE)
|
||||
|
||||
for(var/mob/M in range(1, loc))
|
||||
for(var/_M in mobs_viewing)
|
||||
var/mob/M = _M
|
||||
if((M.s_active == src) && M.client)
|
||||
M.client.screen -= I
|
||||
|
||||
@@ -498,6 +529,10 @@
|
||||
close(M)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/storage/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
update_viewers()
|
||||
|
||||
/obj/item/storage/attack_ghost(mob/user)
|
||||
if(isobserver(user))
|
||||
// Revenants don't get to play with the toys.
|
||||
@@ -539,14 +574,6 @@
|
||||
/obj/item/storage/proc/populate_contents()
|
||||
return // Override
|
||||
|
||||
/obj/item/storage/Destroy()
|
||||
for(var/obj/O in contents)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
|
||||
QDEL_NULL(boxes)
|
||||
QDEL_NULL(closer)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/emp_act(severity)
|
||||
..()
|
||||
for(var/I in contents)
|
||||
|
||||
@@ -309,3 +309,24 @@ To apply, hold the injector a short distance away from the outer thigh before ap
|
||||
new /obj/item/reagent_containers/syringe/capulettium_plus(src)
|
||||
new /obj/item/reagent_containers/syringe/sarin(src)
|
||||
new /obj/item/reagent_containers/syringe/pancuronium(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/nuke
|
||||
name = "box" //Bit of stealth, since you spawn with it
|
||||
desc = "It's just an ordinary box."
|
||||
icon_state = "box"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/nuke/populate_contents()
|
||||
new /obj/item/screwdriver/nuke(src)
|
||||
new /obj/item/nuke_core_container(src)
|
||||
new /obj/item/paper/guides/antag/nuke_instructions(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/supermatter
|
||||
name = "box"
|
||||
desc = "It's just an ordinary box."
|
||||
icon_state = "box"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/supermatter/populate_contents()
|
||||
new /obj/item/scalpel/supermatter(src)
|
||||
new /obj/item/retractor/supermatter(src)
|
||||
new /obj/item/nuke_core_container/supermatter(src)
|
||||
new /obj/item/paper/guides/antag/supermatter_sliver(src)
|
||||
|
||||
Reference in New Issue
Block a user