mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Merge pull request #14395 from MrStonedOne/nomoreminus1
Removes a bunch of sleep(-1) and spawn(-1) from the code
This commit is contained in:
@@ -149,7 +149,7 @@ var/global/datum/controller/master/Master = new()
|
||||
// If we caused BYOND to miss a tick, stop processing for a bit...
|
||||
if(startingtick < world.time || start_time + 1 < world.timeofday)
|
||||
break
|
||||
sleep(-1)
|
||||
sleep(0)
|
||||
|
||||
cost = MC_AVERAGE(cost, world.timeofday - start_time)
|
||||
if(ran_subsystems)
|
||||
|
||||
@@ -485,5 +485,5 @@ var/datum/subsystem/ticker/ticker
|
||||
//map rotate chance defaults to 75% of the length of the round (in minutes)
|
||||
if (!prob((world.time/600)*config.maprotatechancedelta))
|
||||
return
|
||||
spawn(-1) //compiling a map can lock up the mc for 30 to 60 seconds if we don't spawn
|
||||
spawn(0) //compiling a map can lock up the mc for 30 to 60 seconds if we don't spawn
|
||||
maprotate()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
//world << "Events in [args[1]] called"
|
||||
var/list/event = listgetindex(events,args[1])
|
||||
if(istype(event))
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
for(var/datum/event/E in event)
|
||||
if(!E.Fire(arglist(args.Copy(2))))
|
||||
clearEvent(args[1],E)
|
||||
|
||||
@@ -82,12 +82,12 @@
|
||||
/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound)
|
||||
if(location)
|
||||
if(effect)
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
src = null
|
||||
effect.attach(location)
|
||||
effect.start()
|
||||
if(sound)
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
src = null
|
||||
playsound(location,sound,60,1)
|
||||
return
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param)
|
||||
Handler from received signals. By default does nothing. Define your own for your object.
|
||||
Avoid of sending signals directly from this proc, use spawn(-1). Do not use sleep() here please.
|
||||
Avoid of sending signals directly from this proc, use spawn(0). Do not use sleep() here please.
|
||||
parameters:
|
||||
signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return!
|
||||
receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO.
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
add_part_set_to_queue(filter.get("partset_to_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
if(processing_queue || being_built)
|
||||
return 0
|
||||
processing_queue = 1
|
||||
|
||||
@@ -10,7 +10,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
name = init_name
|
||||
switch(name)
|
||||
if("Removed",null,"")
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
throw EXCEPTION("invalid admin-rank name")
|
||||
return
|
||||
|
||||
@@ -16,12 +16,12 @@ var/list/admin_datums = list()
|
||||
|
||||
/datum/admins/New(datum/admin_rank/R, ckey)
|
||||
if(!ckey)
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
del(src)
|
||||
throw EXCEPTION("Admin datum created without a ckey")
|
||||
return
|
||||
if(!istype(R))
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
del(src)
|
||||
throw EXCEPTION("Admin datum created without a rank")
|
||||
return
|
||||
|
||||
@@ -131,7 +131,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
if (register_asset)
|
||||
register_asset(file,files[file])
|
||||
send_asset(client,file)
|
||||
sleep(-1) //queuing calls like this too quickly can cause issues in some client versions
|
||||
sleep(0) //queuing calls like this too quickly can cause issues in some client versions
|
||||
|
||||
//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up.
|
||||
//if it's an icon or something be careful, you'll have to copy it before further use.
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
//close open doors
|
||||
if(istype(O, /obj/machinery/door))
|
||||
var/obj/machinery/door/Door = O
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
if(Door)
|
||||
Door.close()
|
||||
else if (istype(AM,/mob))
|
||||
@@ -443,7 +443,7 @@
|
||||
if(T)
|
||||
var/obj/machinery/door/Door = locate() in T
|
||||
if(Door)
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
Door.close()
|
||||
|
||||
/obj/docking_port/mobile/proc/roadkill(list/L, dir, x, y)
|
||||
|
||||
Reference in New Issue
Block a user