mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +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_SWAP_MODULE "Swap a Robot Module"
|
||||||
#define MODIFIY_ROBOT_RESET_MODULE "Fully Reset Robot Module"
|
#define MODIFIY_ROBOT_RESET_MODULE "Fully Reset Robot Module"
|
||||||
#define MODIFIY_ROBOT_TOGGLE_ERT "Toggle ERT Module Overwrite"
|
#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_STATION_ACCESS "Toggle All Station Access Codes"
|
||||||
#define MODIFIY_ROBOT_TOGGLE_CENT_ACCESS "Toggle Central Access Codes"
|
#define MODIFIY_ROBOT_TOGGLE_CENT_ACCESS "Toggle Central Access Codes"
|
||||||
|
|||||||
@@ -10,11 +10,42 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(!target.module)
|
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")
|
var/list/pre_modification_options = list(MODIFIY_ROBOT_TOGGLE_ERT, MODIFIY_ROBOT_LIMIT_MODULES_ADD, MODIFIY_ROBOT_LIMIT_MODULES_REMOVE)
|
||||||
return
|
while(TRUE)
|
||||||
target.crisis_override = !target.crisis_override
|
var/pre_modification_choice = tgui_input_list(usr, "Which pre module selection edits would you like to perform form [target]","Choice", pre_modification_options)
|
||||||
to_chat(usr, "<span class='danger'>You [target.crisis_override? "enabled":"disabled"] [target]'s combat module overwrite.</span>")
|
if(!pre_modification_choice || pre_modification_choice == "Cancel")
|
||||||
return
|
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)
|
if(!target.module.modules)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -66,6 +66,9 @@
|
|||||||
var/sleeper_state = 0 // 0 for empty, 1 for normal, 2 for mediborg-healthy
|
var/sleeper_state = 0 // 0 for empty, 1 for normal, 2 for mediborg-healthy
|
||||||
var/scrubbing = FALSE //Floor cleaning enabled
|
var/scrubbing = FALSE //Floor cleaning enabled
|
||||||
|
|
||||||
|
// Subtype limited modules or admin restrictions
|
||||||
|
var/list/restrict_modules_to = list()
|
||||||
|
|
||||||
// Components are basically robot organs.
|
// Components are basically robot organs.
|
||||||
var/list/components = list()
|
var/list/components = list()
|
||||||
|
|
||||||
@@ -327,21 +330,27 @@
|
|||||||
var/list/modules = list()
|
var/list/modules = list()
|
||||||
//VOREStatation Edit Start: shell restrictions //CHOMPstaton change to blacklist
|
//VOREStatation Edit Start: shell restrictions //CHOMPstaton change to blacklist
|
||||||
if(shell)
|
if(shell)
|
||||||
modules.Add(robot_module_types)
|
if(restrict_modules_to.len > 0)
|
||||||
modules.Remove(GLOB.shell_module_blacklist) // CHOMPEdit - Managed Globals
|
modules.Add(restrict_modules_to)
|
||||||
//CHOMPedit Add
|
else
|
||||||
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
|
modules.Add(robot_module_types)
|
||||||
to_chat(src, span_red("Crisis mode active. Combat module available."))
|
modules.Remove(GLOB.shell_module_blacklist) // CHOMPEdit - Managed Globals
|
||||||
modules |= emergency_module_types
|
//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
|
//CHOMPedit end
|
||||||
else
|
else
|
||||||
modules.Add(robot_module_types)
|
if(restrict_modules_to.len > 0)
|
||||||
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
|
modules.Add(restrict_modules_to)
|
||||||
to_chat(src, span_red("Crisis mode active. Combat module available."))
|
else
|
||||||
modules |= emergency_module_types
|
modules.Add(robot_module_types)
|
||||||
for(var/module_name in whitelisted_module_types)
|
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
|
||||||
if(is_borg_whitelisted(src, module_name))
|
to_chat(src, span_red("Crisis mode active. Combat module available."))
|
||||||
modules |= module_name
|
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
|
//VOREStatation Edit End: shell restrictions
|
||||||
modtype = tgui_input_list(usr, "Please, select a module!", "Robot module", modules)
|
modtype = tgui_input_list(usr, "Please, select a module!", "Robot module", modules)
|
||||||
|
|
||||||
@@ -1312,6 +1321,8 @@
|
|||||||
icon_selected = 1
|
icon_selected = 1
|
||||||
icon_selection_tries = 0
|
icon_selection_tries = 0
|
||||||
sprite_type = robot_species
|
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>")
|
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()
|
/mob/living/silicon/robot/proc/set_default_module_icon()
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
idcard_type = /obj/item/weapon/card/id
|
idcard_type = /obj/item/weapon/card/id
|
||||||
icon_selected = FALSE
|
icon_selected = FALSE
|
||||||
can_be_antagged = FALSE
|
can_be_antagged = FALSE
|
||||||
|
restrict_modules_to = list("Gravekeeper")
|
||||||
|
|
||||||
/mob/living/silicon/robot/gravekeeper/init()
|
/mob/living/silicon/robot/gravekeeper/init()
|
||||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
braintype = "Drone"
|
braintype = "Drone"
|
||||||
idcard_type = /obj/item/weapon/card/id
|
idcard_type = /obj/item/weapon/card/id
|
||||||
icon_selected = FALSE
|
icon_selected = FALSE
|
||||||
|
restrict_modules_to = list("Lost")
|
||||||
|
|
||||||
/mob/living/silicon/robot/lost/init()
|
/mob/living/silicon/robot/lost/init()
|
||||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
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
|
/mob/living/silicon/robot/syndicate
|
||||||
lawupdate = 0
|
lawupdate = 0
|
||||||
scrambledcodes = 1
|
scrambledcodes = 1
|
||||||
|
emagged = 1
|
||||||
modtype = "Syndicate"
|
modtype = "Syndicate"
|
||||||
lawchannel = "State"
|
lawchannel = "State"
|
||||||
braintype = "Drone"
|
braintype = "Drone"
|
||||||
idcard_type = /obj/item/weapon/card/id/syndicate
|
idcard_type = /obj/item/weapon/card/id/syndicate
|
||||||
icon_selected = FALSE
|
icon_selected = FALSE
|
||||||
|
restrict_modules_to = list("Protector", "Mechanist", "Combat Medic")
|
||||||
|
|
||||||
/mob/living/silicon/robot/syndicate/init()
|
/mob/living/silicon/robot/syndicate/init()
|
||||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||||
@@ -17,7 +19,9 @@
|
|||||||
updatename("Syndicate")
|
updatename("Syndicate")
|
||||||
|
|
||||||
if(!cell)
|
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()
|
laws = new /datum/ai_laws/syndicate_override()
|
||||||
|
|
||||||
@@ -29,17 +33,23 @@
|
|||||||
/mob/living/silicon/robot/syndicate/protector/init()
|
/mob/living/silicon/robot/syndicate/protector/init()
|
||||||
..()
|
..()
|
||||||
module = new /obj/item/weapon/robot_module/robot/syndicate/protector(src)
|
module = new /obj/item/weapon/robot_module/robot/syndicate/protector(src)
|
||||||
|
modtype = "Protector"
|
||||||
|
restrict_modules_to = list("Protector")
|
||||||
updatename("Protector")
|
updatename("Protector")
|
||||||
|
|
||||||
/mob/living/silicon/robot/syndicate/mechanist/init()
|
/mob/living/silicon/robot/syndicate/mechanist/init()
|
||||||
..()
|
..()
|
||||||
module = new /obj/item/weapon/robot_module/robot/syndicate/mechanist(src)
|
module = new /obj/item/weapon/robot_module/robot/syndicate/mechanist(src)
|
||||||
|
modtype = "Mechanist"
|
||||||
|
restrict_modules_to = list("Mechanist")
|
||||||
updatename("Mechanist")
|
updatename("Mechanist")
|
||||||
|
|
||||||
/mob/living/silicon/robot/syndicate/combat_medic/init()
|
/mob/living/silicon/robot/syndicate/combat_medic/init()
|
||||||
..()
|
..()
|
||||||
module = new /obj/item/weapon/robot_module/robot/syndicate/combat_medic(src)
|
module = new /obj/item/weapon/robot_module/robot/syndicate/combat_medic(src)
|
||||||
|
modtype = "Combat Medic"
|
||||||
|
restrict_modules_to = list("Combat Medic")
|
||||||
updatename("Combat Medic")
|
updatename("Combat Medic")
|
||||||
|
|
||||||
/mob/living/silicon/robot/syndicate/speech_bubble_appearance()
|
/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_movement.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\robot_remote_control.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\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_vr.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\dogborg\dog_modules_yw.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"
|
#include "code\modules\mob\living\silicon\robot\dogborg\dog_sleeper_vr.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user