mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-14 09:27:45 +01:00
Cyborg Access Rework (#15157)
This commit is contained in:
committed by
GitHub
parent
2fcfa8adb7
commit
ff7c10f9cc
@@ -292,7 +292,7 @@ var/list/ai_verbs_default = list(
|
||||
id_card.registered_name = pickedName
|
||||
id_card.assignment = "AI"
|
||||
id_card.access = get_all_station_access()
|
||||
id_card.access += access_synth
|
||||
id_card.access += access_equipment
|
||||
id_card.update_name()
|
||||
|
||||
if(client)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
// Modules and active items
|
||||
var/mod_type = "Default"
|
||||
var/spawn_module // Which module does this robot use when it spawns in?
|
||||
var/selecting_module = 0 //whether the borg is in process of selecting its module or not.
|
||||
var/selecting_module = FALSE //whether the borg is in process of selecting its module or not.
|
||||
var/obj/item/robot_module/module
|
||||
var/obj/item/module_active
|
||||
var/obj/item/module_state_1
|
||||
@@ -108,6 +108,8 @@
|
||||
var/key_type
|
||||
var/scrambled_codes = FALSE // When true, doesn't show up on robotics console.
|
||||
|
||||
id_card_type = /obj/item/card/id/synthetic/cyborg
|
||||
|
||||
// Alerts
|
||||
var/view_alerts = FALSE
|
||||
|
||||
@@ -118,7 +120,7 @@
|
||||
var/killswitch_time = 60
|
||||
|
||||
// Weapon lock
|
||||
var/weapon_lock = 0
|
||||
var/weapon_lock = FALSE
|
||||
var/weapon_lock_time = 120
|
||||
|
||||
// Verbs
|
||||
@@ -201,6 +203,24 @@
|
||||
hud_list[IMPTRACK_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
|
||||
hud_list[SPECIALROLE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
|
||||
|
||||
/mob/living/silicon/robot/proc/update_access()
|
||||
if(emagged || malf_AI_module || crisis)
|
||||
id_card.access = get_all_station_access() + access_equipment // Give full station access
|
||||
return
|
||||
|
||||
id_card = new id_card_type()
|
||||
|
||||
if(module)
|
||||
if(module.all_access)
|
||||
id_card.access = get_all_station_access() + access_equipment // Give full station access
|
||||
return
|
||||
|
||||
for(var/job_type in module.specialized_access_types)
|
||||
var/datum/job/job = new job_type()
|
||||
id_card.access |= job.access
|
||||
|
||||
to_chat(src, SPAN_NOTICE("Access set to the department the role belongs to."))
|
||||
|
||||
/mob/living/silicon/robot/proc/recalculate_synth_capacities()
|
||||
if(!module?.synths)
|
||||
return
|
||||
@@ -212,6 +232,8 @@
|
||||
for(var/obj/item/stack/SM in module.modules)
|
||||
SM.update_icon()
|
||||
|
||||
update_access()
|
||||
|
||||
/mob/living/silicon/robot/proc/init()
|
||||
ai_camera = new /obj/item/device/camera/siliconcam/robot_camera(src)
|
||||
laws = new law_preset()
|
||||
@@ -399,7 +421,7 @@
|
||||
return null
|
||||
|
||||
var/dat = "<HEAD><TITLE>[src.name] Self-Diagnosis Report</TITLE></HEAD><BODY>\n"
|
||||
for (var/V in components)
|
||||
for(var/V in components)
|
||||
var/datum/robot_component/C = components[V]
|
||||
dat += "<b>[capitalize_first_letters(C.name)]</b><br><table><tr><td>Brute Damage:</td><td>[C.brute_damage]</td></tr><tr><td>Electronics Damage:</td><td>[C.electronics_damage]</td></tr><tr><td>Powered:</td><td>[(!C.idle_usage || C.is_powered()) ? "Yes" : "No"]</td></tr><tr><td>Toggled:</td><td>[ C.toggled ? "Yes" : "No"]</td></table>"
|
||||
|
||||
@@ -500,7 +522,7 @@
|
||||
set src in usr
|
||||
|
||||
mopping = !mopping
|
||||
if (mopping)
|
||||
if(mopping)
|
||||
usr.visible_message(SPAN_NOTICE("[usr]'s integrated mopping system rumbles to life."), SPAN_NOTICE("You enable your integrated mopping system."))
|
||||
playsound(usr, 'sound/machines/hydraulic_long.ogg', 100, 1)
|
||||
else
|
||||
@@ -532,11 +554,18 @@
|
||||
else
|
||||
stat(null, text("No Cell Inserted!"))
|
||||
|
||||
/mob/living/silicon/robot/proc/show_access()
|
||||
if(!module)
|
||||
stat(null, text("Access type: assistant level access"))
|
||||
else
|
||||
stat(null, text("Access type: [module.all_access ? "all access" : "role specific"]"))
|
||||
|
||||
// update the status screen display
|
||||
/mob/living/silicon/robot/Stat()
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
show_cell_power()
|
||||
show_access()
|
||||
show_jetpack_pressure()
|
||||
stat(null, text("Lights: [lights_on ? "ON" : "OFF"]"))
|
||||
if(module)
|
||||
@@ -685,7 +714,7 @@
|
||||
to_chat(user, SPAN_NOTICE("You open \the [src]'s maintenance hatch."))
|
||||
opened = TRUE
|
||||
handle_panel_overlay()
|
||||
else if (istype(W, /obj/item/stock_parts/matter_bin) && opened) // Installing/swapping a matter bin
|
||||
else if(istype(W, /obj/item/stock_parts/matter_bin) && opened) // Installing/swapping a matter bin
|
||||
if(storage)
|
||||
to_chat(user, SPAN_NOTICE("You replace \the [storage] with \the [W]"))
|
||||
storage.forceMove(get_turf(src))
|
||||
@@ -719,7 +748,7 @@
|
||||
C.brute_damage = 0
|
||||
C.electronics_damage = 0
|
||||
handle_panel_overlay()
|
||||
else if (W.iswirecutter() || W.ismultitool())
|
||||
else if(W.iswirecutter() || W.ismultitool())
|
||||
if(wires_exposed)
|
||||
wires.Interact(user)
|
||||
else
|
||||
@@ -855,14 +884,14 @@
|
||||
<B>Installed Modules</B><BR><BR>"}
|
||||
|
||||
|
||||
for (var/obj in module.modules)
|
||||
if (!obj)
|
||||
for(var/obj in module.modules)
|
||||
if(!obj)
|
||||
dat += text("<B>Resource depleted</B><BR>")
|
||||
else if(activated(obj))
|
||||
dat += text("[obj]: <B>Activated</B><BR>")
|
||||
else
|
||||
dat += text("[obj]: <A HREF=?src=\ref[src];act=\ref[obj]>Activate</A><BR>")
|
||||
if (emagged)
|
||||
if(emagged)
|
||||
if(activated(module.emag))
|
||||
dat += text("[module.emag]: <B>Activated</B><BR>")
|
||||
else
|
||||
@@ -1215,6 +1244,7 @@
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
id_card.access = get_all_station_access() + access_equipment // Give full station access
|
||||
var/time = time2text(world.realtime, "hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
set_zeroth_law("Only [user.real_name] and people they designate as being such are operatives.")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var/global/list/robot_modules = list(
|
||||
"Service" = /obj/item/robot_module/clerical/butler,
|
||||
"Clerical" = /obj/item/robot_module/clerical/general,
|
||||
"Service" = /obj/item/robot_module/service/butler,
|
||||
"Clerical" = /obj/item/robot_module/service/clerical,
|
||||
"Research" = /obj/item/robot_module/research,
|
||||
"Mining" = /obj/item/robot_module/miner,
|
||||
"Rescue" = /obj/item/robot_module/medical/rescue,
|
||||
@@ -20,21 +20,21 @@ var/global/list/robot_modules = list(
|
||||
var/channels = list()
|
||||
var/networks = list()
|
||||
var/languages = list( // Any listed language will be understandable. Any set to TRUE will be speakable
|
||||
LANGUAGE_SOL_COMMON = TRUE,
|
||||
LANGUAGE_ELYRAN_STANDARD = TRUE,
|
||||
LANGUAGE_TRADEBAND = TRUE,
|
||||
LANGUAGE_UNATHI = FALSE,
|
||||
LANGUAGE_SIIK_MAAS = FALSE,
|
||||
LANGUAGE_SKRELLIAN = FALSE,
|
||||
LANGUAGE_GUTTER = TRUE,
|
||||
LANGUAGE_VAURCESE = FALSE,
|
||||
LANGUAGE_ROOTSONG = FALSE,
|
||||
LANGUAGE_SIGN = FALSE,
|
||||
LANGUAGE_SIGN_TAJARA = FALSE,
|
||||
LANGUAGE_SIIK_TAJR = FALSE,
|
||||
LANGUAGE_AZAZIBA = FALSE,
|
||||
LANGUAGE_DELVAHII = FALSE,
|
||||
LANGUAGE_YA_SSA = FALSE
|
||||
LANGUAGE_SOL_COMMON = TRUE,
|
||||
LANGUAGE_ELYRAN_STANDARD = TRUE,
|
||||
LANGUAGE_TRADEBAND = TRUE,
|
||||
LANGUAGE_UNATHI = FALSE,
|
||||
LANGUAGE_SIIK_MAAS = FALSE,
|
||||
LANGUAGE_SKRELLIAN = FALSE,
|
||||
LANGUAGE_GUTTER = TRUE,
|
||||
LANGUAGE_VAURCESE = FALSE,
|
||||
LANGUAGE_ROOTSONG = FALSE,
|
||||
LANGUAGE_SIGN = FALSE,
|
||||
LANGUAGE_SIGN_TAJARA = FALSE,
|
||||
LANGUAGE_SIIK_TAJR = FALSE,
|
||||
LANGUAGE_AZAZIBA = FALSE,
|
||||
LANGUAGE_DELVAHII = FALSE,
|
||||
LANGUAGE_YA_SSA = FALSE
|
||||
)
|
||||
var/sprites = list()
|
||||
var/can_be_pushed = TRUE
|
||||
@@ -50,6 +50,8 @@ var/global/list/robot_modules = list(
|
||||
// Bookkeeping
|
||||
var/list/original_languages = list()
|
||||
var/list/added_networks = list()
|
||||
var/list/specialized_access_types = list(/datum/job/assistant) // an job we take access from. Used to mirror job's IDs for specific borg modules.
|
||||
var/all_access = FALSE
|
||||
|
||||
/obj/item/robot_module/Initialize(mapload, var/mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
@@ -209,6 +211,7 @@ var/global/list/robot_modules = list(
|
||||
"Cooler Master" = list(ROBOT_CHASSIS = "coolermaster_medi", ROBOT_PANEL = "coolermaster_medi", ROBOT_EYES = "coolermaster"),
|
||||
"Phage" = list(ROBOT_CHASSIS = "phage_medi", ROBOT_PANEL = "phage_medi", ROBOT_EYES = "phage")
|
||||
)
|
||||
specialized_access_types = list(/datum/job/doctor, /datum/job/surgeon)
|
||||
|
||||
/obj/item/robot_module/medical/general/Initialize()
|
||||
. = ..()
|
||||
@@ -270,6 +273,7 @@ var/global/list/robot_modules = list(
|
||||
|
||||
/obj/item/robot_module/medical/rescue
|
||||
name = "rescue robot module"
|
||||
specialized_access_types = list(/datum/job/med_tech)
|
||||
// If anyone wants to make custom rescue robot sprites, be my guest.
|
||||
|
||||
/obj/item/robot_module/medical/rescue/Initialize()
|
||||
@@ -353,6 +357,7 @@ var/global/list/robot_modules = list(
|
||||
"Cooler Master" = list(ROBOT_CHASSIS = "coolermaster_engi", ROBOT_PANEL = "coolermaster", ROBOT_EYES = "coolermaster"),
|
||||
"Phage" = list(ROBOT_CHASSIS = "phage_engi", ROBOT_PANEL = "phage", ROBOT_EYES = "phage")
|
||||
)
|
||||
specialized_access_types = list(/datum/job/engineer, /datum/job/atmos)
|
||||
|
||||
/obj/item/robot_module/engineering/construction
|
||||
name = "construction robot module"
|
||||
@@ -551,6 +556,7 @@ var/global/list/robot_modules = list(
|
||||
)
|
||||
|
||||
var/mopping = FALSE
|
||||
specialized_access_types = list(/datum/job/janitor)
|
||||
|
||||
/obj/item/robot_module/janitor/Initialize()
|
||||
. = ..()
|
||||
@@ -578,7 +584,7 @@ var/global/list/robot_modules = list(
|
||||
var/obj/item/reagent_containers/spray/S = emag
|
||||
S.reagents.add_reagent(/decl/reagent/lube, 2 * amount)
|
||||
|
||||
/obj/item/robot_module/clerical
|
||||
/obj/item/robot_module/service
|
||||
name = "service robot module"
|
||||
channels = list(CHANNEL_SERVICE = TRUE)
|
||||
networks = list(NETWORK_SERVICE)
|
||||
@@ -621,7 +627,9 @@ var/global/list/robot_modules = list(
|
||||
"Phage" = list(ROBOT_CHASSIS = "phage_serv", ROBOT_PANEL = "phage", ROBOT_EYES = "phage")
|
||||
)
|
||||
|
||||
/obj/item/robot_module/clerical/butler/Initialize()
|
||||
specialized_access_types = list(/datum/job/bartender, /datum/job/chef, /datum/job/hydro)
|
||||
|
||||
/obj/item/robot_module/service/butler/Initialize()
|
||||
. = ..()
|
||||
modules += new /obj/item/gripper/service(src)
|
||||
modules += new /obj/item/reagent_containers/glass/bucket(src)
|
||||
@@ -667,12 +675,13 @@ var/global/list/robot_modules = list(
|
||||
RG.add_reagent(/decl/reagent/polysomnine/beer2, 50)
|
||||
emag.name = "Mickey Finn's Special Brew"
|
||||
|
||||
/obj/item/robot_module/clerical/general
|
||||
/obj/item/robot_module/service/clerical
|
||||
name = "clerical robot module"
|
||||
channels = list(CHANNEL_SUPPLY = TRUE, CHANNEL_COMMAND = TRUE)
|
||||
networks = list(NETWORK_MINE)
|
||||
specialized_access_types = list(/datum/job/janitor) // Janitor is a nice general access without specifics
|
||||
|
||||
/obj/item/robot_module/clerical/general/Initialize()
|
||||
/obj/item/robot_module/service/clerical/Initialize()
|
||||
. = ..()
|
||||
modules += new /obj/item/pen/robopen(src)
|
||||
modules += new /obj/item/form_printer(src)
|
||||
@@ -718,6 +727,7 @@ var/global/list/robot_modules = list(
|
||||
)
|
||||
|
||||
supported_upgrades = list(/obj/item/robot_parts/robot_component/jetpack)
|
||||
specialized_access_types = list(/datum/job/mining)
|
||||
|
||||
/obj/item/robot_module/miner/Initialize()
|
||||
. = ..()
|
||||
@@ -783,6 +793,7 @@ var/global/list/robot_modules = list(
|
||||
"Cooler Master" = list(ROBOT_CHASSIS = "coolermaster_sci", ROBOT_PANEL = "coolermaster", ROBOT_EYES = "coolermaster"),
|
||||
"Phage" = list(ROBOT_CHASSIS = "phage_sci", ROBOT_PANEL = "phage", ROBOT_EYES = "phage")
|
||||
)
|
||||
specialized_access_types = list(/datum/job/scientist, /datum/job/xenobiologist, /datum/job/xenobotanist)
|
||||
|
||||
/obj/item/robot_module/research/Initialize()
|
||||
. = ..()
|
||||
@@ -876,7 +887,7 @@ var/global/list/robot_modules = list(
|
||||
"Cooler Master" = list(ROBOT_CHASSIS = "coolermaster_syndi", ROBOT_PANEL = "coolermaster_syndi", ROBOT_EYES = "coolermaster"),
|
||||
"Phage" = list(ROBOT_CHASSIS = "phage_syndi", ROBOT_PANEL = "phage_syndi", ROBOT_EYES = "phage")
|
||||
)
|
||||
|
||||
all_access = TRUE
|
||||
|
||||
/obj/item/robot_module/combat/Initialize(mapload, mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
@@ -914,6 +925,7 @@ var/global/list/robot_modules = list(
|
||||
)
|
||||
can_be_pushed = FALSE
|
||||
supported_upgrades = list(/obj/item/robot_parts/robot_component/jetpack)
|
||||
all_access = TRUE
|
||||
|
||||
/obj/item/robot_module/military/Initialize()
|
||||
. = ..()
|
||||
@@ -932,6 +944,7 @@ var/global/list/robot_modules = list(
|
||||
name = "drone module"
|
||||
no_slip = TRUE
|
||||
networks = list(NETWORK_ENGINEERING)
|
||||
all_access = TRUE
|
||||
|
||||
/obj/item/robot_module/drone/Initialize(mapload, mob/living/silicon/robot/robot)
|
||||
. = ..()
|
||||
@@ -1031,6 +1044,7 @@ var/global/list/robot_modules = list(
|
||||
/obj/item/robot_module/drone/construction
|
||||
name = "construction drone module"
|
||||
channels = list(CHANNEL_ENGINEERING = TRUE)
|
||||
all_access = TRUE
|
||||
|
||||
/obj/item/robot_module/drone/construction/Initialize()
|
||||
. = ..()
|
||||
@@ -1045,6 +1059,7 @@ var/global/list/robot_modules = list(
|
||||
no_slip = TRUE
|
||||
channels = list(CHANNEL_SUPPLY = TRUE)
|
||||
networks = list(NETWORK_MINE)
|
||||
all_access = TRUE
|
||||
|
||||
/obj/item/robot_module/mining_drone/Initialize(mapload, mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
@@ -1137,6 +1152,7 @@ var/global/list/robot_modules = list(
|
||||
)
|
||||
sprites = list("Roller" = list(ROBOT_CHASSIS = "droid-combat", ROBOT_PANEL = "heavy_syndi", ROBOT_EYES = "droid-combat")) //TMP // temp my left nut // temp my right nut
|
||||
can_be_pushed = FALSE
|
||||
all_access = TRUE
|
||||
|
||||
/obj/item/robot_module/bluespace/Initialize(mapload, mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user