Drones now have pacifism + You can click on a drone fab as a ghost to become a drone (#22793)

* drones now have pacifism

* oops

* bing
This commit is contained in:
Contrabang
2023-10-12 17:26:15 +01:00
committed by GitHub
parent 9bab795342
commit f5dd22f1e4
2 changed files with 13 additions and 2 deletions
@@ -49,9 +49,12 @@
/obj/machinery/drone_fabricator/examine(mob/user)
. = ..()
if(produce_drones && drone_progress >= 100 && isobserver(user) && count_drones() < MAX_MAINT_DRONES)
if(isobserver(user) && drone_prepared())
. += "<BR><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>"
/obj/machinery/drone_fabricator/proc/drone_prepared()
return (produce_drones && drone_progress >= 100 && (count_drones() < MAX_MAINT_DRONES))
/obj/machinery/drone_fabricator/proc/count_drones()
var/drones = 0
for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
@@ -78,7 +81,11 @@
drone_progress = 0
/obj/machinery/drone_fabricator/attack_ghost(mob/user as mob)
if(!drone_prepared() || !isobserver(user))
return
var/mob/dead/observer/ghost = user
ghost.join_as_drone()
/mob/dead/verb/join_as_drone()
set category = "Ghost"
@@ -99,6 +99,9 @@
scanner.Grant(src)
update_icons()
// Drones have laws to not attack people
ADD_TRAIT(src, TRAIT_PACIFISM, INNATE_TRAIT)
/mob/living/silicon/robot/drone/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null)
laws = new /datum/ai_laws/drone()
connected_ai = null
@@ -234,6 +237,7 @@
clear_supplied_laws()
clear_inherent_laws()
laws = new /datum/ai_laws/syndicate_override
REMOVE_TRAIT(src, TRAIT_PACIFISM, INNATE_TRAIT)
set_zeroth_law("Only [H.real_name] and people [H.real_name] designates as being such are Syndicate Agents.")
to_chat(src, "<b>Obey these laws:</b>")