mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Malf Drone POI support
Add support for POI
This commit is contained in:
@@ -50,16 +50,6 @@ var/list/mob_hat_cache = list()
|
|||||||
updateicon()
|
updateicon()
|
||||||
updatename()
|
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()
|
/mob/living/silicon/robot/drone/updateicon()
|
||||||
cut_overlays()
|
cut_overlays()
|
||||||
|
|
||||||
@@ -256,6 +246,10 @@ var/list/mob_hat_cache = list()
|
|||||||
clear_supplied_laws(1)
|
clear_supplied_laws(1)
|
||||||
clear_inherent_laws(1)
|
clear_inherent_laws(1)
|
||||||
clear_ion_laws(1)
|
clear_ion_laws(1)
|
||||||
|
if(faction == "malf_drone")
|
||||||
|
laws = new /datum/ai_laws/nanotrasen/malfunction
|
||||||
|
foreign_droid = TRUE
|
||||||
|
else
|
||||||
laws = new law_type
|
laws = new law_type
|
||||||
|
|
||||||
//Reboot procs.
|
//Reboot procs.
|
||||||
@@ -278,9 +272,3 @@ var/list/mob_hat_cache = list()
|
|||||||
to_chat(src,"<b>Loaded</b>.")
|
to_chat(src,"<b>Loaded</b>.")
|
||||||
spawn(4 SECONDS)
|
spawn(4 SECONDS)
|
||||||
welcome_drone()
|
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.")
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
//Triggered by self
|
//Triggered by self
|
||||||
/mob/observer/dead/verb/join_as_drone()
|
/mob/observer/dead/verb/join_as_drone()
|
||||||
|
|
||||||
set category = "Ghost"
|
set category = "Ghost"
|
||||||
set name = "Join As Drone"
|
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."
|
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)
|
var/choice = tgui_input_list(src, "Which fabricator do you wish to use?", "Fabricator Choice", all_fabricators)
|
||||||
if(choice)
|
if(choice)
|
||||||
|
var/faction
|
||||||
|
if(choice == "Unknown")
|
||||||
|
faction = "malf_drone"
|
||||||
var/obj/machinery/drone_fabricator/chosen_fabricator = all_fabricators[choice]
|
var/obj/machinery/drone_fabricator/chosen_fabricator = all_fabricators[choice]
|
||||||
chosen_fabricator.create_drone(src.client)
|
chosen_fabricator.create_drone(src.client,faction)
|
||||||
@@ -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)
|
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>"
|
. += "<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)
|
/obj/machinery/drone_fabricator/proc/create_drone(var/client/player,var/faction = "")
|
||||||
choose_dronetype(possible_drones) //Call Drone choice before executing create_drone
|
|
||||||
if(stat & NOPOWER)
|
if(stat & NOPOWER)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -81,6 +80,7 @@
|
|||||||
|
|
||||||
if(player && !istype(player.mob,/mob/observer/dead))
|
if(player && !istype(player.mob,/mob/observer/dead))
|
||||||
return
|
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.")
|
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)
|
flick("h_lathe_leave",src)
|
||||||
@@ -89,7 +89,10 @@
|
|||||||
time_last_drone = world.time
|
time_last_drone = world.time
|
||||||
|
|
||||||
var/mob/living/silicon/robot/drone/new_drone = new drone_type(get_turf(src))
|
var/mob/living/silicon/robot/drone/new_drone = new drone_type(get_turf(src))
|
||||||
|
if(faction)
|
||||||
|
new_drone.faction = faction
|
||||||
if(player)
|
if(player)
|
||||||
|
if(!faction)
|
||||||
announce_ghost_joinleave(player, 0, "They have taken control over a maintenance drone.")
|
announce_ghost_joinleave(player, 0, "They have taken control over a maintenance drone.")
|
||||||
if(player.mob && player.mob.mind) player.mob.mind.reset()
|
if(player.mob && player.mob.mind) player.mob.mind.reset()
|
||||||
new_drone.transfer_personality(player)
|
new_drone.transfer_personality(player)
|
||||||
@@ -105,10 +108,9 @@
|
|||||||
) //List of drone types to choose from.//Changeable in mapping.
|
) //List of drone types to choose from.//Changeable in mapping.
|
||||||
|
|
||||||
/obj/machinery/drone_fabricator/proc/choose_dronetype(possible_drones)
|
/obj/machinery/drone_fabricator/proc/choose_dronetype(possible_drones)
|
||||||
if(!LAZYLEN(possible_drones)-1)
|
if(LAZYLEN(possible_drones)<2)
|
||||||
drone_type = possible_drones[1]
|
drone_type = possible_drones[possible_drones[1]]
|
||||||
return
|
else
|
||||||
var/choice
|
drone_type = input(usr,"What module would you like to use?") as null|anything in possible_drones
|
||||||
choice = input(usr,"What module would you like to use?") as null|anything in possible_drones
|
if(!drone_type) return
|
||||||
if(!choice) return
|
drone_type = possible_drones[drone_type]
|
||||||
drone_type = possible_drones[choice]
|
|
||||||
|
|||||||
@@ -55,6 +55,22 @@
|
|||||||
var/can_blitz = FALSE
|
var/can_blitz = FALSE
|
||||||
//vore addition
|
//vore addition
|
||||||
mob_size = MOB_SMALL
|
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
|
//CORE END
|
||||||
|
|
||||||
//VARIANTS
|
//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, "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, "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>.")
|
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()
|
/mob/living/silicon/robot/drone/construction/init()
|
||||||
..()
|
..()
|
||||||
flavor_text = "It's a bulky construction drone stamped with a Sol Central glyph."
|
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_pull_mobs = MOB_PULL_SAME
|
||||||
can_pick_shell = FALSE
|
can_pick_shell = FALSE
|
||||||
shell_accessories = list("eyes-miningdrone")
|
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."
|
flavor_text = "It's a bulky mining drone stamped with a Grayson logo."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user