Malf Drone POI support

Add support for POI
This commit is contained in:
Sharkmare
2023-04-13 13:36:41 +02:00
parent db980c6f1d
commit 36d7772d67
4 changed files with 40 additions and 30 deletions

View File

@@ -50,16 +50,6 @@ var/list/mob_hat_cache = list()
updateicon()
updatename()
/mob/living/silicon/robot/drone/init()
if(!scrambledcodes && !foreign_droid)
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
additional_law_channels["Drone"] = ":d"
if(!laws) laws = new law_type
if(!module) module = new module_type(src)
flavor_text = "It's a tiny little repair drone. The casing is stamped with an corporate logo and the subscript: '[using_map.company_name] Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
/mob/living/silicon/robot/drone/updateicon()
cut_overlays()
@@ -256,7 +246,11 @@ var/list/mob_hat_cache = list()
clear_supplied_laws(1)
clear_inherent_laws(1)
clear_ion_laws(1)
laws = new law_type
if(faction == "malf_drone")
laws = new /datum/ai_laws/nanotrasen/malfunction
foreign_droid = TRUE
else
laws = new law_type
//Reboot procs.
@@ -278,9 +272,3 @@ var/list/mob_hat_cache = list()
to_chat(src,"<b>Loaded</b>.")
spawn(4 SECONDS)
welcome_drone()
/mob/living/silicon/robot/drone/proc/welcome_drone()
to_chat(src, "<b>You are a maintenance drone, a tiny-brained robotic repair machine</b>.")
to_chat(src, "You have no individual will, no personality, and no drives or urges other than your laws.")
to_chat(src, "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>")
to_chat(src, "Use <b>say ;Hello</b> to talk to other drones and <b>say Hello</b> to speak silently to your nearby fellows.")

View File

@@ -18,7 +18,6 @@
//Triggered by self
/mob/observer/dead/verb/join_as_drone()
set category = "Ghost"
set name = "Join As Drone"
set desc = "If there is a powered, enabled fabricator in the game world with a prepared chassis, join as a maintenance drone."
@@ -81,5 +80,8 @@
var/choice = tgui_input_list(src, "Which fabricator do you wish to use?", "Fabricator Choice", all_fabricators)
if(choice)
var/faction
if(choice == "Unknown")
faction = "malf_drone"
var/obj/machinery/drone_fabricator/chosen_fabricator = all_fabricators[choice]
chosen_fabricator.create_drone(src.client)
chosen_fabricator.create_drone(src.client,faction)

View File

@@ -71,8 +71,7 @@
if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
. += "<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/create_drone(var/client/player)
choose_dronetype(possible_drones) //Call Drone choice before executing create_drone
/obj/machinery/drone_fabricator/proc/create_drone(var/client/player,var/faction = "")
if(stat & NOPOWER)
return
@@ -81,6 +80,7 @@
if(player && !istype(player.mob,/mob/observer/dead))
return
choose_dronetype(possible_drones) //Call Drone choice before executing create_drone
visible_message("\The [src] churns and grinds as it lurches into motion, disgorging a shiny new drone after a few moments.")
flick("h_lathe_leave",src)
@@ -89,8 +89,11 @@
time_last_drone = world.time
var/mob/living/silicon/robot/drone/new_drone = new drone_type(get_turf(src))
if(faction)
new_drone.faction = faction
if(player)
announce_ghost_joinleave(player, 0, "They have taken control over a maintenance drone.")
if(!faction)
announce_ghost_joinleave(player, 0, "They have taken control over a maintenance drone.")
if(player.mob && player.mob.mind) player.mob.mind.reset()
new_drone.transfer_personality(player)
@@ -105,10 +108,9 @@
) //List of drone types to choose from.//Changeable in mapping.
/obj/machinery/drone_fabricator/proc/choose_dronetype(possible_drones)
if(!LAZYLEN(possible_drones)-1)
drone_type = possible_drones[1]
return
var/choice
choice = input(usr,"What module would you like to use?") as null|anything in possible_drones
if(!choice) return
drone_type = possible_drones[choice]
if(LAZYLEN(possible_drones)<2)
drone_type = possible_drones[possible_drones[1]]
else
drone_type = input(usr,"What module would you like to use?") as null|anything in possible_drones
if(!drone_type) return
drone_type = possible_drones[drone_type]

View File

@@ -55,6 +55,22 @@
var/can_blitz = FALSE
//vore addition
mob_size = MOB_SMALL
/mob/living/silicon/robot/drone/proc/welcome_drone()
to_chat(src, "<b>You are a maintenance drone, a tiny-brained robotic repair machine</b>.")
to_chat(src, "You have no individual will, no personality, and no drives or urges other than your laws.")
to_chat(src, "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>")
to_chat(src, "Use <b>say ;Hello</b> to talk to other drones and <b>say Hello</b> to speak silently to your nearby fellows.")
if(faction == "malf_drone")
to_chat(src, "Use <b>Directive 0 in effect.")
/mob/living/silicon/robot/drone/init()
if(!scrambledcodes && !foreign_droid)
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
additional_law_channels["Drone"] = ":d"
if(!laws) laws = new law_type
if(!module) module = new module_type(src)
flavor_text = "It's a tiny little repair drone. The casing is stamped with an corporate logo and the subscript: '[using_map.company_name] Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
//CORE END
//VARIANTS
@@ -73,6 +89,8 @@
to_chat(src, "You are assigned to a Sol Central construction project. The name is irrelevant. Your task is to complete construction and subsystem integration as soon as possible.")
to_chat(src, "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows.")
to_chat(src, "<b>You do not follow orders from anyone; not the AI, not humans, and not other synthetics.</b>.")
if(faction == "malf_drone")
to_chat(src, "Use <b>Directive 0 in effect.")
/mob/living/silicon/robot/drone/construction/init()
..()
flavor_text = "It's a bulky construction drone stamped with a Sol Central glyph."
@@ -87,7 +105,7 @@
can_pull_mobs = MOB_PULL_SAME
can_pick_shell = FALSE
shell_accessories = list("eyes-miningdrone")
/mob/living/silicon/robot/drone/construction/init()
/mob/living/silicon/robot/drone/mining/init()
..()
flavor_text = "It's a bulky mining drone stamped with a Grayson logo."