mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Gave the beach an edge instead of endless void.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var/global/datum/controller/process/timer/PStimer
|
||||
var/global/datum/controller/process/timer/timer_controller
|
||||
|
||||
/datum/controller/process/timer
|
||||
var/list/processing_timers = list()
|
||||
@@ -7,7 +7,7 @@ var/global/datum/controller/process/timer/PStimer
|
||||
/datum/controller/process/timer/setup()
|
||||
name = "timer"
|
||||
schedule_interval = 5 //every 0.5 seconds
|
||||
PStimer = src
|
||||
timer_controller = src
|
||||
|
||||
/datum/controller/process/timer/statProcess()
|
||||
..()
|
||||
@@ -44,17 +44,17 @@ var/global/datum/controller/process/timer/PStimer
|
||||
nextid++
|
||||
|
||||
/datum/timedevent/Destroy()
|
||||
PStimer.processing_timers -= src
|
||||
PStimer.hashes -= hash
|
||||
timer_controller.processing_timers -= src
|
||||
timer_controller.hashes -= hash
|
||||
return QDEL_HINT_IWILLGC
|
||||
|
||||
/proc/addtimer(thingToCall, procToCall, wait, unique = FALSE, ...)
|
||||
if(!PStimer) //can't run timers before the mc has been created
|
||||
if(!timer_controller) //can't run timers before the mc has been created
|
||||
return
|
||||
if(!thingToCall || !procToCall || wait <= 0)
|
||||
return
|
||||
if(PStimer.disabled)
|
||||
PStimer.disabled = 0
|
||||
if(timer_controller.disabled)
|
||||
timer_controller.disabled = 0
|
||||
|
||||
var/datum/timedevent/event = new()
|
||||
event.thingToCall = thingToCall
|
||||
@@ -66,15 +66,15 @@ var/global/datum/controller/process/timer/PStimer
|
||||
|
||||
// Check for dupes if unique = 1.
|
||||
if(unique)
|
||||
if(event.hash in PStimer.hashes)
|
||||
if(event.hash in timer_controller.hashes)
|
||||
return
|
||||
// If we are unique (or we're not checking that), add the timer and return the id.
|
||||
PStimer.processing_timers += event
|
||||
PStimer.hashes += event.hash
|
||||
timer_controller.processing_timers += event
|
||||
timer_controller.hashes += event.hash
|
||||
return event.id
|
||||
|
||||
/proc/deltimer(id)
|
||||
for(var/datum/timedevent/event in PStimer.processing_timers)
|
||||
for(var/datum/timedevent/event in timer_controller.processing_timers)
|
||||
if(event.id == id)
|
||||
qdel(event)
|
||||
return 1
|
||||
|
||||
@@ -13,4 +13,18 @@
|
||||
/turf/unsimulated/floor/snow
|
||||
name = "snow"
|
||||
icon = 'icons/turf/snow.dmi'
|
||||
icon_state = "snow"
|
||||
icon_state = "snow"
|
||||
|
||||
/turf/unsimulated/floor/chasm
|
||||
name = "sinkhole"
|
||||
desc = "It's difficult to see the bottom."
|
||||
density = 1
|
||||
icon = 'icons/turf/floors/Chasms.dmi'
|
||||
icon_state = "Fill"
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
|
||||
/turf/unsimulated/floor/chasm/New()
|
||||
spawn(1)
|
||||
smooth_icon(src)
|
||||
smooth_icon_neighbors(src)
|
||||
@@ -0,0 +1,37 @@
|
||||
/obj/effect/waterfall
|
||||
name = "waterfall effect"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
opacity = 0
|
||||
mouse_opacity = 0
|
||||
density = 0
|
||||
anchored = 1
|
||||
invisibility = 101
|
||||
|
||||
var/water_frequency = 15
|
||||
var/water_timer = 0
|
||||
|
||||
/obj/effect/waterfall/New()
|
||||
water_timer = addtimer(src, "drip", water_frequency)
|
||||
|
||||
/obj/effect/waterfall/Destroy()
|
||||
if(water_timer)
|
||||
deltimer(water_timer)
|
||||
water_timer = null
|
||||
|
||||
/obj/effect/waterfall/proc/drip()
|
||||
var/obj/effect/effect/water/W = new(loc)
|
||||
W.dir = dir
|
||||
spawn(1)
|
||||
W.loc = get_step(W, dir)
|
||||
water_timer = addtimer(src, "drip", water_frequency)
|
||||
|
||||
/obj/structure/sign/terrain
|
||||
name = "warning sign"
|
||||
desc = "Watch your step! Unstable terrain."
|
||||
density = 1
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "signpost"
|
||||
|
||||
/obj/structure/sign/terrain/attack_hand(mob/user)
|
||||
examine(user)
|
||||
Reference in New Issue
Block a user