Maintenance Drone Fix (#10479)

Fixed the maintenance drone ghost spawner.
    Added more info as to why certain ghost spawners are disabled to the ghost spawner menu.
This commit is contained in:
Geeves
2020-11-10 08:15:14 +02:00
committed by GitHub
parent dd0b88a3ef
commit 5a1231082e
6 changed files with 55 additions and 10 deletions
@@ -20,9 +20,27 @@
var/fabricator_tag = "Aurora"
var/drone_progress = 0
var/produce_drones = 1
var/produce_drones = TRUE
var/time_last_drone = 500
var/drone_type = /mob/living/silicon/robot/drone
var/drone_ghostrole_name = "maintdrone"
/obj/machinery/drone_fabricator/disabled
produce_drones = FALSE
/obj/machinery/drone_fabricator/Initialize()
. = ..()
if(SSticker.current_state == GAME_STATE_PLAYING)
enable_drone_spawn()
/obj/machinery/drone_fabricator/Destroy()
. = ..()
var/datum/ghostspawner/G = SSghostroles.spawners[drone_ghostrole_name]
LAZYREMOVE(G.spawnpoints, get_turf(src))
/obj/machinery/drone_fabricator/proc/enable_drone_spawn()
var/datum/ghostspawner/G = SSghostroles.spawners[drone_ghostrole_name]
LAZYADD(G.spawnpoints, get_turf(src))
/obj/machinery/drone_fabricator/derelict
name = "construction drone fabricator"
@@ -57,7 +75,7 @@
/obj/machinery/drone_fabricator/examine(mob/user)
..(user)
if(produce_drones && drone_progress >= 100 && istype(user,/mob/abstract) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
to_chat(user, SPAN_NOTICE("<B>A drone is prepared. use 'Ghost Roles' from the Ghost tab to spawn as a maintenance drone.</B>"))
to_chat(user, SPAN_NOTICE("<B>A drone is prepared. use 'Ghost Spawner' from the Ghost tab to spawn as a maintenance drone.</B>"))
/obj/machinery/drone_fabricator/proc/create_drone(var/client/player)
if(stat & NOPOWER)