mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
for(var/bad_code in world)
Removes a very large amount of world loops. Adds a macro to painlessly generate a global list, and the needed code to modify the list when an object is made or deleted automatically. Cleans up some commented out code.
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
id = input
|
||||
for(var/obj/machinery/conveyor_switch/C in world)
|
||||
for(var/obj/machinery/conveyor_switch/C in machines)
|
||||
if(C.id == id)
|
||||
C.conveyors |= src
|
||||
return
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
/obj/machinery/conveyor_switch/LateInitialize()
|
||||
conveyors = list()
|
||||
for(var/obj/machinery/conveyor/C in world)
|
||||
for(var/obj/machinery/conveyor/C in machines)
|
||||
if(C.id == id)
|
||||
conveyors += C
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
update()
|
||||
|
||||
// find any switches with same id as this one, and set their positions to match us
|
||||
for(var/obj/machinery/conveyor_switch/S in world)
|
||||
for(var/obj/machinery/conveyor_switch/S in machines)
|
||||
if(S.id == src.id)
|
||||
S.position = position
|
||||
S.update()
|
||||
@@ -269,7 +269,7 @@
|
||||
return
|
||||
id = input
|
||||
conveyors = list() // Clear list so they aren't double added.
|
||||
for(var/obj/machinery/conveyor/C in world)
|
||||
for(var/obj/machinery/conveyor/C in machines)
|
||||
if(C.id == id)
|
||||
conveyors += C
|
||||
return
|
||||
@@ -289,7 +289,7 @@
|
||||
update()
|
||||
|
||||
// find any switches with same id as this one, and set their positions to match us
|
||||
for(var/obj/machinery/conveyor_switch/S in world)
|
||||
for(var/obj/machinery/conveyor_switch/S in machines)
|
||||
if(S.id == src.id)
|
||||
S.position = position
|
||||
S.update()
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
for (var/mob/C in viewers(src))
|
||||
C.show_message("<font color='red'>[GM.name] has been placed in the [src] by [user].</font>", 3)
|
||||
qdel(G)
|
||||
|
||||
|
||||
add_attack_logs(user,GM,"Disposals dunked")
|
||||
return
|
||||
|
||||
@@ -967,7 +967,7 @@
|
||||
|
||||
// *** TEST verb
|
||||
//client/verb/dispstop()
|
||||
// for(var/obj/structure/disposalholder/H in world)
|
||||
// for(var/obj/structure/disposalholder/H in all_objs)
|
||||
// H.active = 0
|
||||
|
||||
// a straight or bent segment
|
||||
|
||||
Reference in New Issue
Block a user