mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 20:57:23 +01:00
Merge branch 'dev' into mutiny-fixes
This commit is contained in:
@@ -194,4 +194,26 @@
|
||||
user.visible_message("<span class='notice'>[user] activates the flare.</span>", "<span class='notice'>You pull the cord on the flare, activating it!</span>")
|
||||
src.force = on_damage
|
||||
src.damtype = "fire"
|
||||
processing_objects += src
|
||||
processing_objects += src
|
||||
|
||||
/obj/item/device/flashlight/slime
|
||||
gender = PLURAL
|
||||
name = "glowing slime extract"
|
||||
desc = "A glowing ball of what appears to be amber."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "floor1" //not a slime extract sprite but... something close enough!
|
||||
item_state = "slime"
|
||||
w_class = 1
|
||||
m_amt = 0
|
||||
g_amt = 0
|
||||
brightness_on = 6
|
||||
on = 1 //Bio-luminesence has one setting, on.
|
||||
|
||||
/obj/item/device/flashlight/slime/New()
|
||||
SetLuminosity(brightness_on)
|
||||
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
|
||||
update_brightness()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/flashlight/slime/attack_self(mob/user)
|
||||
return //Bio-luminescence does not toggle.
|
||||
@@ -148,7 +148,7 @@
|
||||
src = null //dont kill proc after del()
|
||||
usr.before_take_item(oldsrc)
|
||||
del(oldsrc)
|
||||
if (istype(O,/obj/item))
|
||||
if (istype(O,/obj/item) && istype(usr,/mob/living/carbon))
|
||||
usr.put_in_hands(O)
|
||||
O.add_fingerprint(usr)
|
||||
//BubbleWrap - so newly formed boxes are empty
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
src.imp = null
|
||||
update()
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
if (c.scanned)
|
||||
user << "\red Something is already scanned inside the implant!"
|
||||
return
|
||||
imp:scanned = A
|
||||
c.scanned = A
|
||||
if(istype(A.loc,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = A.loc
|
||||
H.u_equip(A)
|
||||
else if(istype(A.loc,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = A.loc
|
||||
S.remove_from_storage(A)
|
||||
A.loc.contents.Remove(A)
|
||||
update()
|
||||
|
||||
@@ -80,8 +80,6 @@
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/internal/Adjacent(var/atom/neighbor)
|
||||
return master_item.Adjacent(neighbor)
|
||||
@@ -456,12 +456,30 @@
|
||||
O.hear_talk(M, text)
|
||||
|
||||
//Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area).
|
||||
//Returns -1 if the atom was not found on user.
|
||||
/atom/proc/storage_depth(mob/user)
|
||||
//Returns -1 if the atom was not found on container.
|
||||
/atom/proc/storage_depth(atom/container)
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
while (cur_atom && !(cur_atom in user.contents))
|
||||
while (cur_atom && !(cur_atom in container.contents))
|
||||
if (isarea(cur_atom))
|
||||
return -1
|
||||
if (istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
if (!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
return depth
|
||||
|
||||
//Like storage depth, but returns the depth to the nearest turf
|
||||
//Returns -1 if no top level turf (a loc was null somewhere, or a non-turf atom's loc was an area somehow).
|
||||
/atom/proc/storage_depth_turf()
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
while (cur_atom && !isturf(cur_atom))
|
||||
if (isarea(cur_atom))
|
||||
return -1
|
||||
if (istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
|
||||
Reference in New Issue
Block a user