mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] robot outsider overhaul (#8133)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -16,5 +16,7 @@
|
||||
#define MODIFIY_ROBOT_SWAP_MODULE "Swap a Robot Module"
|
||||
#define MODIFIY_ROBOT_RESET_MODULE "Fully Reset Robot Module"
|
||||
#define MODIFIY_ROBOT_TOGGLE_ERT "Toggle ERT Module Overwrite"
|
||||
#define MODIFIY_ROBOT_LIMIT_MODULES_ADD "Restrict Modules to"
|
||||
#define MODIFIY_ROBOT_LIMIT_MODULES_REMOVE "Remove from restricted Modules"
|
||||
#define MODIFIY_ROBOT_TOGGLE_STATION_ACCESS "Toggle All Station Access Codes"
|
||||
#define MODIFIY_ROBOT_TOGGLE_CENT_ACCESS "Toggle Central Access Codes"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -66,6 +66,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()
|
||||
|
||||
@@ -327,21 +330,27 @@
|
||||
var/list/modules = list()
|
||||
//VOREStatation Edit Start: shell restrictions //CHOMPstaton change to blacklist
|
||||
if(shell)
|
||||
modules.Add(robot_module_types)
|
||||
modules.Remove(GLOB.shell_module_blacklist) // CHOMPEdit - Managed Globals
|
||||
//CHOMPedit Add
|
||||
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
|
||||
to_chat(src, span_red("Crisis mode active. Combat module available."))
|
||||
modules |= emergency_module_types
|
||||
if(restrict_modules_to.len > 0)
|
||||
modules.Add(restrict_modules_to)
|
||||
else
|
||||
modules.Add(robot_module_types)
|
||||
modules.Remove(GLOB.shell_module_blacklist) // CHOMPEdit - Managed Globals
|
||||
//CHOMPedit Add
|
||||
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
|
||||
to_chat(src, span_red("Crisis mode active. Combat module available."))
|
||||
modules |= emergency_module_types
|
||||
//CHOMPedit end
|
||||
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)
|
||||
|
||||
@@ -1312,6 +1321,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)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 127 KiB |
@@ -3226,7 +3226,6 @@
|
||||
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\robot_remote_control.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\robot_vr.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\syndicate.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\dogborg\dog_modules_vr.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\dogborg\dog_modules_yw.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\dogborg\dog_sleeper_vr.dm"
|
||||
|
||||
Reference in New Issue
Block a user