robot outsider overhaul (#15894)

* robot outsider overhaul

* .

* adds icon and defines
This commit is contained in:
Kashargul
2024-04-02 19:14:13 +10:00
committed by GitHub
parent 4a8b7c0067
commit e51e5281f5
9 changed files with 72 additions and 44 deletions
+36 -5
View File
@@ -10,11 +10,42 @@
return
if(!target.module)
if(tgui_alert(usr, "This robot has not yet selected a module. Would you like to toggle combat module override?","Confirm",list("Yes","No"))!="Yes")
return
target.crisis_override = !target.crisis_override
to_chat(usr, "<span class='danger'>You [target.crisis_override? "enabled":"disabled"] [target]'s combat module overwrite.</span>")
return
var/list/pre_modification_options = list(MODIFIY_ROBOT_TOGGLE_ERT, MODIFIY_ROBOT_LIMIT_MODULES_ADD, MODIFIY_ROBOT_LIMIT_MODULES_REMOVE)
while(TRUE)
var/pre_modification_choice = tgui_input_list(usr, "Which pre module selection edits would you like to perform form [target]","Choice", pre_modification_options)
if(!pre_modification_choice || pre_modification_choice == "Cancel")
return
switch(pre_modification_choice)
if(MODIFIY_ROBOT_TOGGLE_ERT)
if(tgui_alert(usr, "This robot has not yet selected a module. Would you like to toggle combat module override?","Confirm",list("Yes","No"))!="Yes")
continue
target.crisis_override = !target.crisis_override
to_chat(usr, "<span class='danger'>You [target.crisis_override? "enabled":"disabled"] [target]'s combat module overwrite.</span>")
continue
if(MODIFIY_ROBOT_LIMIT_MODULES_ADD)
if(target.restrict_modules_to.len)
to_chat(usr, "<span class='warning'>[target]'s modules are already restricted. For details you can use the remove verb to show all active restrictions.</span>")
var/list/possible_options = list()
for(var/entry in robot_modules)
if(!target.restrict_modules_to.Find(entry))
possible_options += entry
while(TRUE)
var/selected_type = tgui_input_list(usr, "Please select the module type to add to the robot's restrictions. This will limit the module choices to the added types only.", "Module types", possible_options)
if(!selected_type || selected_type == "Cancel")
break
possible_options -= selected_type
target.restrict_modules_to += selected_type
to_chat(usr, "<span class='danger'>You added [selected_type] to [target]'s possible modules list.</span>")
continue
if(MODIFIY_ROBOT_LIMIT_MODULES_REMOVE)
while(TRUE)
var/selected_type = tgui_input_list(usr, "Please select the module type to remove. Removing all module types here will allow default station module selection.", "Module types", target.restrict_modules_to)
if(!selected_type || selected_type == "Cancel")
to_chat(usr, "<span class='danger'>[target] uses the default module list without special restrictions.</span>")
break
target.restrict_modules_to -= selected_type
to_chat(usr, "<span class='danger'>You removed [selected_type] from [target]'s possible modules list.</span>")
continue
if(!target.module.modules)
return
+19 -8
View File
@@ -64,6 +64,9 @@
var/sleeper_state = 0 // 0 for empty, 1 for normal, 2 for mediborg-healthy
var/scrubbing = FALSE //Floor cleaning enabled
// Subtype limited modules or admin restrictions
var/list/restrict_modules_to = list()
// Components are basically robot organs.
var/list/components = list()
@@ -322,15 +325,21 @@
var/list/modules = list()
//VOREStatation Edit Start: shell restrictions
if(shell)
modules.Add(shell_module_types)
if(restrict_modules_to.len > 0)
modules.Add(restrict_modules_to)
else
modules.Add(shell_module_types)
else
modules.Add(robot_module_types)
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
to_chat(src, span_red("Crisis mode active. Combat module available."))
modules |= emergency_module_types
for(var/module_name in whitelisted_module_types)
if(is_borg_whitelisted(src, module_name))
modules |= module_name
if(restrict_modules_to.len > 0)
modules.Add(restrict_modules_to)
else
modules.Add(robot_module_types)
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
to_chat(src, span_red("Crisis mode active. Combat module available."))
modules |= emergency_module_types
for(var/module_name in whitelisted_module_types)
if(is_borg_whitelisted(src, module_name))
modules |= module_name
//VOREStatation Edit End: shell restrictions
modtype = tgui_input_list(usr, "Please, select a module!", "Robot module", modules)
@@ -1249,6 +1258,8 @@
icon_selected = 1
icon_selection_tries = 0
sprite_type = robot_species
if(hands)
update_hud()
to_chat(src, "<span class='filter_notice'>Your icon has been set. You now require a module reset to change it.</span>")
/mob/living/silicon/robot/proc/set_default_module_icon()
@@ -8,6 +8,7 @@
idcard_type = /obj/item/weapon/card/id
icon_selected = FALSE
can_be_antagged = FALSE
restrict_modules_to = list("Gravekeeper")
/mob/living/silicon/robot/gravekeeper/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
@@ -7,6 +7,7 @@
braintype = "Drone"
idcard_type = /obj/item/weapon/card/id
icon_selected = FALSE
restrict_modules_to = list("Lost")
/mob/living/silicon/robot/lost/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
@@ -298,4 +299,4 @@
return
return
@@ -1,11 +1,13 @@
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
emagged = 1
modtype = "Syndicate"
lawchannel = "State"
braintype = "Drone"
idcard_type = /obj/item/weapon/card/id/syndicate
icon_selected = FALSE
restrict_modules_to = list("Protector", "Mechanist", "Combat Medic")
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
@@ -17,7 +19,9 @@
updatename("Syndicate")
if(!cell)
cell = new /obj/item/weapon/cell/high(src) // 15k cell, because Antag.
cell = new /obj/item/weapon/cell/robot_syndi(src) // 25k cell, because Antag.
// new /obj/item/weapon/robot_module/robot/syndicate(src)
laws = new /datum/ai_laws/syndicate_override()
@@ -29,17 +33,23 @@
/mob/living/silicon/robot/syndicate/protector/init()
..()
module = new /obj/item/weapon/robot_module/robot/syndicate/protector(src)
modtype = "Protector"
restrict_modules_to = list("Protector")
updatename("Protector")
/mob/living/silicon/robot/syndicate/mechanist/init()
..()
module = new /obj/item/weapon/robot_module/robot/syndicate/mechanist(src)
modtype = "Mechanist"
restrict_modules_to = list("Mechanist")
updatename("Mechanist")
/mob/living/silicon/robot/syndicate/combat_medic/init()
..()
module = new /obj/item/weapon/robot_module/robot/syndicate/combat_medic(src)
modtype = "Combat Medic"
restrict_modules_to = list("Combat Medic")
updatename("Combat Medic")
/mob/living/silicon/robot/syndicate/speech_bubble_appearance()
return "synthetic_evil"
return "synthetic_evil"
@@ -1,27 +0,0 @@
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
emagged = 1
icon_state = "securityrobot"
modtype = "Security"
lawchannel = "State"
idcard_type = /obj/item/weapon/card/id/syndicate
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell/robot_syndi(src)
..()
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
cut_overlays()
init_id()
new /obj/item/weapon/robot_module/robot/syndicate(src)
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)