mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into OrganRefactor
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
/obj/structure/closet/cardboard
|
||||
name = "large cardboard box"
|
||||
desc = "Just a box..."
|
||||
icon_state = "cardboard"
|
||||
icon_opened = "cardboard_open"
|
||||
icon_closed = "cardboard"
|
||||
health = 10
|
||||
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_delay = 0
|
||||
else
|
||||
move_delay = 0
|
||||
|
||||
/obj/structure/closet/cardboard/open()
|
||||
if(opened || !can_open())
|
||||
return 0
|
||||
if(!egged)
|
||||
var/mob/living/Snake = null
|
||||
for(var/mob/living/L in src.contents)
|
||||
Snake = L
|
||||
break
|
||||
if(Snake)
|
||||
var/list/alerted = viewers(7,src)
|
||||
if(alerted)
|
||||
for(var/mob/living/L in alerted)
|
||||
if(!L.stat)
|
||||
L.do_alert_animation(L)
|
||||
egged = 1
|
||||
alerted << sound('sound/machines/chime.ogg')
|
||||
..()
|
||||
|
||||
/mob/living/proc/do_alert_animation(atom/A)
|
||||
var/image/I
|
||||
I = image('icons/obj/closet.dmi', A, "cardboard_special", A.layer+1)
|
||||
var/list/viewing = list()
|
||||
for(var/mob/M in viewers(A))
|
||||
if(M.client)
|
||||
viewing |= M.client
|
||||
flick_overlay(I,viewing,8)
|
||||
I.alpha = 0
|
||||
animate(I, pixel_z = 32, alpha = 255, time = 5, easing = ELASTIC_EASING)
|
||||
|
||||
/obj/structure/closet/cardboard/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
var/obj/item/weapon/wirecutters/WC = W
|
||||
new /obj/item/stack/sheet/cardboard(src.loc)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WC].</span>", 3, "You hear cutting.", 2)
|
||||
qdel(src)
|
||||
@@ -255,4 +255,55 @@
|
||||
icon_state = "strawbail2"
|
||||
|
||||
/obj/structure/flora/straw_bail/alt_2
|
||||
icon_state = "strawbail3"
|
||||
icon_state = "strawbail3"
|
||||
|
||||
/obj/structure/bush
|
||||
name = "foliage"
|
||||
desc = "Pretty thick scrub, it'll take something sharp and a lot of determination to clear away."
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "bush1"
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 3.2
|
||||
var/indestructable = 0
|
||||
var/stump = 0
|
||||
|
||||
/obj/structure/bush/New()
|
||||
if(prob(20))
|
||||
opacity = 1
|
||||
|
||||
/*
|
||||
/obj/structure/bush/Bumped(M as mob)
|
||||
if (istype(M, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/A = M
|
||||
A.loc = get_turf(src)
|
||||
else if (istype(M, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/A = M
|
||||
A.loc = get_turf(src)
|
||||
*/
|
||||
|
||||
/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob, params)
|
||||
//hatchets can clear away undergrowth
|
||||
if(istype(I, /obj/item/weapon/hatchet) && !stump)
|
||||
if(indestructable)
|
||||
//this bush marks the edge of the map, you can't destroy it
|
||||
user << "\red You flail away at the undergrowth, but it's too thick here."
|
||||
else
|
||||
user.visible_message("\red <b>[user] begins clearing away [src].</b>","\red <b>You begin clearing away [src].</b>")
|
||||
spawn(rand(15,30))
|
||||
if(get_dist(user,src) < 2)
|
||||
user << "\blue You clear away [src]."
|
||||
var/obj/item/stack/sheet/wood/W = new(src.loc)
|
||||
W.amount = rand(3,15)
|
||||
if(prob(50))
|
||||
icon_state = "stump[rand(1,2)]"
|
||||
name = "cleared foliage"
|
||||
desc = "There used to be dense undergrowth here."
|
||||
density = 0
|
||||
stump = 1
|
||||
pixel_x = rand(-6,6)
|
||||
pixel_y = rand(-6,6)
|
||||
else
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
Reference in New Issue
Block a user