[READY]Makes a bunch of processes subsystems instead (#5814

* Converts various New() definitions to Initialization()
* Adds absolute pathing
This commit is contained in:
kevinz000
2019-01-15 22:58:06 -08:00
committed by Atermonera
parent a5d0dd338c
commit 46c79c7d3e
174 changed files with 1352 additions and 1639 deletions
+10 -10
View File
@@ -4,27 +4,27 @@
icon = 'icons/misc/mark.dmi'
icon_state = "rup"
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
var/drop_get_turf = TRUE
// creates a new object and deletes itself
/obj/random/New()
..()
spawn()
if(istype(src.loc, /obj/structure/loot_pile)) //Spawning from a lootpile is weird, need to wait until we're out of it to do our work.
while(istype(src.loc, /obj/structure/loot_pile))
sleep(1)
if (!prob(spawn_nothing_percentage))
spawn_item()
qdel(src)
/obj/random/Initialize()
. = ..()
if (!prob(spawn_nothing_percentage))
spawn_item()
qdel(src)
// this function should return a specific item to spawn
/obj/random/proc/item_to_spawn()
return 0
/obj/random/drop_location()
return drop_get_turf? get_turf(src) : ..()
// creates the random item
/obj/random/proc/spawn_item()
var/build_path = item_to_spawn()
var/atom/A = new build_path(src.loc)
var/atom/A = new build_path(drop_location())
if(pixel_x || pixel_y)
A.pixel_x = pixel_x
A.pixel_y = pixel_y