7e9b96a00f
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
73 lines
2.1 KiB
Plaintext
73 lines
2.1 KiB
Plaintext
#define SNAKE_SPAM_TICKS 600 //how long between cardboard box openings that trigger the '!'
|
|
/obj/structure/closet/cardboard
|
|
name = "large cardboard box"
|
|
desc = "Just a box..."
|
|
icon_state = "cardboard"
|
|
mob_storage_capacity = 1
|
|
resistance_flags = FLAMMABLE
|
|
obj_integrity = 70
|
|
max_integrity = 70
|
|
integrity_failure = 0
|
|
can_weld_shut = 0
|
|
cutting_tool = /obj/item/weapon/wirecutters
|
|
open_sound = "rustle"
|
|
cutting_sound = 'sound/items/poster_ripped.ogg'
|
|
material_drop = /obj/item/stack/sheet/cardboard
|
|
delivery_icon = "deliverybox"
|
|
anchorable = FALSE
|
|
var/move_speed_multiplier = 1
|
|
var/move_delay = 0
|
|
var/egged = 0
|
|
|
|
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
|
|
if(opened || move_delay || user.stat || user.stunned || user.weakened || user.paralysis || !isturf(loc) || !has_gravity(loc))
|
|
return
|
|
move_delay = 1
|
|
if(step(src, direction))
|
|
spawn(config.walk_speed*move_speed_multiplier)
|
|
move_delay = 0
|
|
else
|
|
move_delay = 0
|
|
|
|
/obj/structure/closet/cardboard/open()
|
|
if(opened || !can_open())
|
|
return 0
|
|
var/list/alerted = null
|
|
if(egged < world.time)
|
|
var/mob/living/Snake = null
|
|
for(var/mob/living/L in src.contents)
|
|
Snake = L
|
|
break
|
|
if(Snake)
|
|
alerted = viewers(7,src)
|
|
..()
|
|
if(LAZYLEN(alerted))
|
|
egged = world.time + SNAKE_SPAM_TICKS
|
|
for(var/mob/living/L in alerted)
|
|
if(!L.stat)
|
|
if(!L.incapacitated(ignore_restraints = 1))
|
|
L.face_atom(src)
|
|
L.do_alert_animation(L)
|
|
playsound(loc, 'sound/machines/chime.ogg', 50, FALSE, -5)
|
|
|
|
/mob/living/proc/do_alert_animation(atom/A)
|
|
var/image/I = image('icons/obj/closet.dmi', A, "cardboard_special", A.layer+1)
|
|
flick_overlay_view(I, A, 8)
|
|
I.alpha = 0
|
|
animate(I, pixel_z = 32, alpha = 255, time = 5, easing = ELASTIC_EASING)
|
|
|
|
|
|
/obj/structure/closet/cardboard/metal
|
|
name = "large metal box"
|
|
desc = "THE COWARDS! THE FOOLS!"
|
|
icon_state = "metalbox"
|
|
obj_integrity = 500
|
|
mob_storage_capacity = 5
|
|
resistance_flags = 0
|
|
move_speed_multiplier = 2
|
|
cutting_tool = /obj/item/weapon/weldingtool
|
|
open_sound = 'sound/machines/click.ogg'
|
|
cutting_sound = 'sound/items/Welder.ogg'
|
|
material_drop = /obj/item/stack/sheet/plasteel
|
|
#undef SNAKE_SPAM_TICKS
|