mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Delete Table
This commit is contained in:
@@ -773,85 +773,6 @@
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/table/tray
|
||||
name = "surgical tray"
|
||||
desc = "A small metal tray with wheels."
|
||||
anchored = FALSE
|
||||
smoothing_flags = NONE
|
||||
smoothing_groups = null
|
||||
canSmoothWith = null
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "tray"
|
||||
buildstack = /obj/item/stack/sheet/mineral/titanium
|
||||
buildstackamount = 2
|
||||
can_be_flipped = FALSE
|
||||
var/list/typecache_can_hold = list(/mob, /obj/item)
|
||||
var/list/held_items = list()
|
||||
|
||||
/obj/structure/table/tray/Initialize()
|
||||
. = ..()
|
||||
typecache_can_hold = typecacheof(typecache_can_hold)
|
||||
for(var/atom/movable/held in get_turf(src))
|
||||
if(!held.anchored && held.move_resist != INFINITY && is_type_in_typecache(held, typecache_can_hold))
|
||||
held_items += held.UID()
|
||||
|
||||
/obj/structure/table/tray/Move(NewLoc, direct)
|
||||
var/atom/OldLoc = loc
|
||||
|
||||
. = ..()
|
||||
if(!.) // ..() will return 0 if we didn't actually move anywhere.
|
||||
return .
|
||||
|
||||
if(direct & (direct - 1)) // This represents a diagonal movement, which is split into multiple cardinal movements. We'll handle moving the items on the cardinals only.
|
||||
return .
|
||||
|
||||
playsound(loc, pick('sound/items/cartwheel1.ogg', 'sound/items/cartwheel2.ogg'), 100, 1, ignore_walls = FALSE)
|
||||
|
||||
var/atom/movable/held
|
||||
for(var/held_uid in held_items)
|
||||
held = locateUID(held_uid)
|
||||
if(!held)
|
||||
held_items -= held_uid
|
||||
continue
|
||||
if(OldLoc != held.loc)
|
||||
held_items -= held_uid
|
||||
continue
|
||||
held.forceMove(NewLoc)
|
||||
|
||||
/obj/structure/table/tray/can_be_pulled(user, grab_state, force, show_message)
|
||||
var/atom/movable/puller = user
|
||||
if(loc != puller.loc)
|
||||
held_items -= puller.UID()
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(M.UID() in held_items)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/tray/item_placed(atom/movable/item)
|
||||
. = ..()
|
||||
if(is_type_in_typecache(item, typecache_can_hold))
|
||||
held_items += item.UID()
|
||||
if(isliving(item))
|
||||
var/mob/living/M = item
|
||||
if(M.pulling == src)
|
||||
M.stop_pulling()
|
||||
|
||||
/obj/structure/table/tray/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/turf/T = get_turf(src)
|
||||
new buildstack(T, buildstackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/tray/deconstruction_hints(mob/user)
|
||||
to_chat(user, "<span class='notice'>It is held together by some <b>screws</b> and <b>bolts</b>.</span>")
|
||||
|
||||
/obj/structure/table/tray/flip()
|
||||
return 0
|
||||
|
||||
/obj/structure/table/tray/narsie_act()
|
||||
return 0
|
||||
|
||||
/*
|
||||
* Racks
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user