Cyborg modules renamed to models (#56312)

Changes the references of borg module (type) to model, adds a file for robot declarations and one for model declarations. Basically trying to make the code layout a little more sane.

Initially changed them to 'configurations' but I prefer model; its meaning is closer to module than configuration and avoids confusion with actual config.
This commit is contained in:
dragomagol
2021-01-22 11:38:35 -08:00
committed by GitHub
parent 48bbd26b81
commit f837ce4397
43 changed files with 908 additions and 810 deletions

View File

@@ -1,13 +1,13 @@
/// Module is compatible with Security Cyborg models
#define BORG_MODULE_SECURITY (1<<0)
/// Module is compatible with Miner Cyborg models
#define BORG_MODULE_MINER (1<<1)
/// Module is compatible with Janitor Cyborg models
#define BORG_MODULE_JANITOR (1<<2)
/// Module is compatible with Medical Cyborg models
#define BORG_MODULE_MEDICAL (1<<3)
/// Module is compatible with Engineering Cyborg models
#define BORG_MODULE_ENGINEERING (1<<4)
/// Module is compatible with Security Cyborg model
#define BORG_MODEL_SECURITY (1<<0)
/// Module is compatible with Miner Cyborg model
#define BORG_MODEL_MINER (1<<1)
/// Module is compatible with Janitor Cyborg model
#define BORG_MODEL_JANITOR (1<<2)
/// Module is compatible with Medical Cyborg model
#define BORG_MODEL_MEDICAL (1<<3)
/// Module is compatible with Engineering Cyborg model
#define BORG_MODEL_ENGINEERING (1<<4)
/// Module is compatible with Ripley Exosuit models
#define EXOSUIT_MODULE_RIPLEY (1<<0)

View File

@@ -39,11 +39,11 @@
#define HONK_BOT (1<<5) // Honkbots & ED-Honks
#define FIRE_BOT (1<<6) // Firebots
#define HYGIENE_BOT (1<<7) // Hygienebots
#define VIBE_BOT (1<<8) //vibe bots
#define VIBE_BOT (1<<8) // Vibe bots
//AI notification defines
#define NEW_BORG 1
#define NEW_MODULE 2
#define NEW_MODEL 2
#define RENAME 3
#define AI_SHELL 4
#define DISCONNECT 5

View File

@@ -483,8 +483,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define NO_TONGUE_TRAIT "no_tongue_trait"
/// Trait granted by [/mob/living/silicon/robot]
/// Traits applied to a silicon mob by their module.
#define MODULE_TRAIT "module_trait"
/// Traits applied to a silicon mob by their model.
#define MODEL_TRAIT "model_trait"
/// Trait from [/datum/antagonist/nukeop/clownop]
#define CLOWNOP_TRAIT "clownop"

View File

@@ -35,7 +35,7 @@
#define WIRE_POWER2 "Main Power 2"
#define WIRE_PROCEED "Proceed"
#define WIRE_RX "Receive"
#define WIRE_RESET_MODULE "Reset Module"
#define WIRE_RESET_MODEL "Reset Model"
#define WIRE_SAFETY "Safety"
#define WIRE_SHOCK "High Voltage Ground"
#define WIRE_SIGNAL "Signal"

View File

@@ -57,7 +57,7 @@
mob_data["module"] = "pAI"
else if(iscyborg(L))
var/mob/living/silicon/robot/R = L
mob_data["module"] = R.module.name
mob_data["module"] = R.model.name
else
category = "others"
mob_data["typepath"] = M.type

View File

@@ -13,10 +13,10 @@
if(..())
return
var/mob/living/silicon/robot/R = usr
if(R.module.type != /obj/item/robot_module)
if(R.model.type != /obj/item/robot_model)
R.hud_used.toggle_show_robot_modules()
return 1
R.pick_module()
R.pick_model()
/atom/movable/screen/robot/module1
name = "module1"
@@ -110,7 +110,6 @@
static_inventory += robit.inv3
//End of module select
using = new /atom/movable/screen/robot/lamp()
using.screen_loc = ui_borg_lamp
using.hud = src
@@ -195,7 +194,7 @@
var/mob/screenmob = viewer || R
if(!R.module)
if(!R.model)
return
if(!R.client)
@@ -205,21 +204,21 @@
//Modules display is shown
screenmob.client.screen += module_store_icon //"store" icon
if(!R.module.modules)
to_chat(usr, "<span class='warning'>Selected module has no modules to select!</span>")
if(!R.model.modules)
to_chat(usr, "<span class='warning'>Selected model has no modules to select!</span>")
return
if(!R.robot_modules_background)
return
var/display_rows = max(CEILING(length(R.module.get_inactive_modules()) / 8, 1),1)
var/display_rows = max(CEILING(length(R.model.get_inactive_modules()) / 8, 1),1)
R.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
screenmob.client.screen += R.robot_modules_background
var/x = -4 //Start at CENTER-4,SOUTH+1
var/y = 1
for(var/atom/movable/A in R.module.get_inactive_modules())
for(var/atom/movable/A in R.model.get_inactive_modules())
//Module is not currently active
screenmob.client.screen += A
if(x < 0)
@@ -238,7 +237,7 @@
//Modules display is hidden
screenmob.client.screen -= module_store_icon //"store" icon
for(var/atom/A in R.module.get_inactive_modules())
for(var/atom/A in R.model.get_inactive_modules())
//Module is not currently active
screenmob.client.screen -= A
R.shown_robot_modules = 0

View File

@@ -62,7 +62,7 @@
/datum/config_entry/flag/disable_human_mood
/datum/config_entry/flag/disable_secborg // disallow secborg module to be chosen.
/datum/config_entry/flag/disable_secborg // disallow secborg model to be chosen.
/datum/config_entry/flag/disable_peaceborg

View File

@@ -259,9 +259,9 @@
for(var/mob/living/rider in robot_parent.buckled_mobs)
rider.setDir(dir)
if(istype(robot_parent.module))
rider.pixel_x = robot_parent.module.ride_offset_x[dir2text(dir)]
rider.pixel_y = robot_parent.module.ride_offset_y[dir2text(dir)]
if(istype(robot_parent.model))
rider.pixel_x = robot_parent.model.ride_offset_x[dir2text(dir)]
rider.pixel_y = robot_parent.model.ride_offset_y[dir2text(dir)]
//now onto every other ridable mob//

View File

@@ -7,7 +7,7 @@
wires = list(
WIRE_AI, WIRE_CAMERA,
WIRE_LAWSYNC, WIRE_LOCKDOWN,
WIRE_RESET_MODULE
WIRE_RESET_MODEL
)
add_duds(2)
..()
@@ -24,7 +24,7 @@
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
status += "The camera light is [!isnull(R.builtInCamera) && R.builtInCamera.status ? "on" : "off"]."
status += "The lockdown indicator is [R.lockcharge ? "on" : "off"]."
status += "There is a star symbol above the [get_color_of_wire(WIRE_RESET_MODULE)] wire."
status += "There is a star symbol above the [get_color_of_wire(WIRE_RESET_MODEL)] wire."
return status
/datum/wires/robot/on_pulse(wire, user)
@@ -56,9 +56,9 @@
R.show_laws()
if(WIRE_LOCKDOWN)
R.SetLockdown(!R.lockcharge) // Toggle
if(WIRE_RESET_MODULE)
if(R.has_module())
R.visible_message("<span class='notice'>[R]'s module servos twitch.</span>", "<span class='notice'>Your module display flickers.</span>")
if(WIRE_RESET_MODEL)
if(R.has_model())
R.visible_message("<span class='notice'>[R]'s model servos twitch.</span>", "<span class='notice'>Your model display flickers.</span>")
/datum/wires/robot/on_cut(wire, mend)
var/mob/living/silicon/robot/R = holder
@@ -86,9 +86,9 @@
if(WIRE_LOCKDOWN) // Simple lockdown.
R.SetLockdown(!mend)
R.logevent("Motor Controller fault [mend?"cleared":"detected"]")
if(WIRE_RESET_MODULE)
if(R.has_module() && !mend)
R.ResetModule()
if(WIRE_RESET_MODEL)
if(R.has_model() && !mend)
R.ResetModel()
/datum/wires/robot/can_reveal_wires(mob/user)
if(HAS_TRAIT(user, TRAIT_KNOW_CYBORG_WIRES))
@@ -97,8 +97,8 @@
return ..()
/datum/wires/robot/always_reveal_wire(color)
// Always reveal the reset module wire.
if(color == get_color_of_wire(WIRE_RESET_MODULE))
// Always reveal the reset model wire.
if(color == get_color_of_wire(WIRE_RESET_MODEL))
return TRUE
return ..()

View File

@@ -26,7 +26,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
/obj/item/assembly, /obj/item/onetankbomb, /obj/item/pda/ai,
/obj/item/small_delivery, /obj/projectile,
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module)
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_model)
/datum/h_sandbox/proc/update()
var/static/list/hrefs = list(

View File

@@ -49,7 +49,7 @@
locked_down = R.lockcharge,
status = R.stat,
charge = R.cell ? round(R.cell.percent()) : null,
module = R.module ? "[R.module.name] Module" : "No Module Detected",
module = R.model ? "[R.model.name] Model" : "No Model Detected",
synchronization = R.connected_ai,
emagged = R.emagged,
ref = REF(R)

View File

@@ -436,7 +436,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
attack_paw(A)
/obj/item/attack_ai(mob/user)
if(istype(src.loc, /obj/item/robot_module))
if(istype(src.loc, /obj/item/robot_model))
//If the item is part of a cyborg module, equip it
if(!iscyborg(user))
return

View File

@@ -389,7 +389,7 @@
var/mob/living/silicon/robot/R = loc
if(istype(R))
for(var/ch_name in R.module.radio_channels)
for(var/ch_name in R.model.radio_channels)
channels[ch_name] = 1
/obj/item/radio/borg/syndicate

View File

@@ -645,7 +645,7 @@
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
var/mob/living/silicon/robot/owner = get_host()
if(owner)
owner.module.allow_riding = FALSE
owner.model.allow_riding = FALSE
active = TRUE
/obj/item/borg/projectile_dampen/proc/deactivate_field()
@@ -657,7 +657,7 @@
var/mob/living/silicon/robot/owner = get_host()
if(owner)
owner.module.allow_riding = TRUE
owner.model.allow_riding = TRUE
/obj/item/borg/projectile_dampen/proc/get_host()
if(istype(host))

View File

@@ -9,19 +9,19 @@
w_class = WEIGHT_CLASS_SMALL
var/locked = FALSE
var/installed = FALSE
var/require_module = FALSE
var/list/module_type = null
/// Bitflags listing module compatibility. Used in the exosuit fabricator for creating sub-categories.
var/list/module_flags = NONE
var/require_model = FALSE
var/list/model_type = null
/// Bitflags listing model compatibility. Used in the exosuit fabricator for creating sub-categories.
var/list/model_flags = NONE
// if true, is not stored in the robot to be ejected
// if module is reset
// if model is reset
var/one_use = FALSE
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R, user = usr)
if(R.stat == DEAD)
to_chat(user, "<span class='warning'>[src] will not function on a deceased cyborg!</span>")
return FALSE
if(module_type && !is_type_in_list(R.module, module_type))
if(model_type && !is_type_in_list(R.model, model_type))
to_chat(R, "<span class='alert'>Upgrade mounting error! No suitable hardpoint detected.</span>")
to_chat(user, "<span class='warning'>There's no mounting point for the module!</span>")
return FALSE
@@ -77,14 +77,14 @@
name = "cyborg rapid disabler cooling module"
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/security)
module_flags = BORG_MODULE_SECURITY
require_model = TRUE
model_type = list(/obj/item/robot_model/security)
model_flags = BORG_MODEL_SECURITY
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.model.modules
if(!T)
to_chat(user, "<span class='warning'>There's no disabler in this unit!</span>")
return FALSE
@@ -98,7 +98,7 @@
/obj/item/borg/upgrade/disablercooler/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.model.modules
if(!T)
return FALSE
T.charge_delay = initial(T.charge_delay)
@@ -125,147 +125,147 @@
/obj/item/borg/upgrade/ddrill
name = "mining cyborg diamond drill"
desc = "A diamond drill replacement for the mining module's standard drill."
desc = "A diamond drill replacement for the mining model's standard drill."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/miner)
module_flags = BORG_MODULE_MINER
require_model = TRUE
model_type = list(/obj/item/robot_model/miner)
model_flags = BORG_MODEL_MINER
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/pickaxe/drill/cyborg/D in R.module)
R.module.remove_module(D, TRUE)
for(var/obj/item/shovel/S in R.module)
R.module.remove_module(S, TRUE)
for(var/obj/item/pickaxe/drill/cyborg/D in R.model)
R.model.remove_module(D, TRUE)
for(var/obj/item/shovel/S in R.model)
R.model.remove_module(S, TRUE)
var/obj/item/pickaxe/drill/cyborg/diamond/DD = new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
R.module.basic_modules += DD
R.module.add_module(DD, FALSE, TRUE)
var/obj/item/pickaxe/drill/cyborg/diamond/DD = new /obj/item/pickaxe/drill/cyborg/diamond(R.model)
R.model.basic_modules += DD
R.model.add_module(DD, FALSE, TRUE)
/obj/item/borg/upgrade/ddrill/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/pickaxe/drill/cyborg/diamond/DD in R.module)
R.module.remove_module(DD, TRUE)
for(var/obj/item/pickaxe/drill/cyborg/diamond/DD in R.model)
R.model.remove_module(DD, TRUE)
var/obj/item/pickaxe/drill/cyborg/D = new (R.module)
R.module.basic_modules += D
R.module.add_module(D, FALSE, TRUE)
var/obj/item/shovel/S = new (R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
var/obj/item/pickaxe/drill/cyborg/D = new (R.model)
R.model.basic_modules += D
R.model.add_module(D, FALSE, TRUE)
var/obj/item/shovel/S = new (R.model)
R.model.basic_modules += S
R.model.add_module(S, FALSE, TRUE)
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/miner)
module_flags = BORG_MODULE_MINER
require_model = TRUE
model_type = list(/obj/item/robot_model/miner)
model_flags = BORG_MODEL_MINER
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
. = ..()
if(.)
for(var/obj/item/storage/bag/ore/cyborg/S in R.module)
R.module.remove_module(S, TRUE)
for(var/obj/item/storage/bag/ore/cyborg/S in R.model)
R.model.remove_module(S, TRUE)
var/obj/item/storage/bag/ore/holding/H = new /obj/item/storage/bag/ore/holding(R.module)
R.module.basic_modules += H
R.module.add_module(H, FALSE, TRUE)
var/obj/item/storage/bag/ore/holding/H = new /obj/item/storage/bag/ore/holding(R.model)
R.model.basic_modules += H
R.model.add_module(H, FALSE, TRUE)
/obj/item/borg/upgrade/soh/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/storage/bag/ore/holding/H in R.module)
R.module.remove_module(H, TRUE)
for(var/obj/item/storage/bag/ore/holding/H in R.model)
R.model.remove_module(H, TRUE)
var/obj/item/storage/bag/ore/cyborg/S = new (R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
var/obj/item/storage/bag/ore/cyborg/S = new (R.model)
R.model.basic_modules += S
R.model.add_module(S, FALSE, TRUE)
/obj/item/borg/upgrade/tboh
name = "janitor cyborg trash bag of holding"
desc = "A trash bag of holding replacement for the janiborg's standard trash bag."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/janitor)
module_flags = BORG_MODULE_JANITOR
require_model = TRUE
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
/obj/item/borg/upgrade/tboh/action(mob/living/silicon/robot/R)
. = ..()
if(.)
for(var/obj/item/storage/bag/trash/cyborg/TB in R.module.modules)
R.module.remove_module(TB, TRUE)
for(var/obj/item/storage/bag/trash/cyborg/TB in R.model.modules)
R.model.remove_module(TB, TRUE)
var/obj/item/storage/bag/trash/bluespace/cyborg/B = new /obj/item/storage/bag/trash/bluespace/cyborg(R.module)
R.module.basic_modules += B
R.module.add_module(B, FALSE, TRUE)
var/obj/item/storage/bag/trash/bluespace/cyborg/B = new /obj/item/storage/bag/trash/bluespace/cyborg(R.model)
R.model.basic_modules += B
R.model.add_module(B, FALSE, TRUE)
/obj/item/borg/upgrade/tboh/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/storage/bag/trash/bluespace/cyborg/B in R.module.modules)
R.module.remove_module(B, TRUE)
for(var/obj/item/storage/bag/trash/bluespace/cyborg/B in R.model.modules)
R.model.remove_module(B, TRUE)
var/obj/item/storage/bag/trash/cyborg/TB = new (R.module)
R.module.basic_modules += TB
R.module.add_module(TB, FALSE, TRUE)
var/obj/item/storage/bag/trash/cyborg/TB = new (R.model)
R.model.basic_modules += TB
R.model.add_module(TB, FALSE, TRUE)
/obj/item/borg/upgrade/amop
name = "janitor cyborg advanced mop"
desc = "An advanced mop replacement for the janiborg's standard mop."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/janitor)
module_flags = BORG_MODULE_JANITOR
require_model = TRUE
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
/obj/item/borg/upgrade/amop/action(mob/living/silicon/robot/R)
. = ..()
if(.)
for(var/obj/item/mop/cyborg/M in R.module.modules)
R.module.remove_module(M, TRUE)
for(var/obj/item/mop/cyborg/M in R.model.modules)
R.model.remove_module(M, TRUE)
var/obj/item/mop/advanced/cyborg/mop = new /obj/item/mop/advanced/cyborg(R.module)
R.module.basic_modules += mop
R.module.add_module(mop, FALSE, TRUE)
var/obj/item/mop/advanced/cyborg/mop = new /obj/item/mop/advanced/cyborg(R.model)
R.model.basic_modules += mop
R.model.add_module(mop, FALSE, TRUE)
/obj/item/borg/upgrade/amop/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/mop/advanced/cyborg/A in R.module.modules)
R.module.remove_module(A, TRUE)
for(var/obj/item/mop/advanced/cyborg/A in R.model.modules)
R.model.remove_module(A, TRUE)
var/obj/item/mop/cyborg/M = new (R.module)
R.module.basic_modules += M
R.module.add_module(M, FALSE, TRUE)
var/obj/item/mop/cyborg/M = new (R.model)
R.model.basic_modules += M
R.model.add_module(M, FALSE, TRUE)
/obj/item/borg/upgrade/prt
name = "janitor cyborg plating repair tool"
desc = "A tiny heating device to repair burnt and damaged hull platings with."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/janitor)
module_flags = BORG_MODULE_JANITOR
require_model = TRUE
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
/obj/item/borg/upgrade/prt/action(mob/living/silicon/robot/R)
. = ..()
if(.)
var/obj/item/cautery/prt/P = new (R.module)
R.module.basic_modules += P
R.module.add_module(P, FALSE, TRUE)
var/obj/item/cautery/prt/P = new (R.model)
R.model.basic_modules += P
R.model.add_module(P, FALSE, TRUE)
/obj/item/borg/upgrade/prt/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/cautery/prt/P in R.module.modules)
R.module.remove_module(P, TRUE)
for(var/obj/item/cautery/prt/P in R.model.modules)
R.model.remove_module(P, TRUE)
/obj/item/borg/upgrade/syndicate
name = "illegal equipment module"
desc = "Unlocks the hidden, deadlier functions of a cyborg."
icon_state = "cyborg_upgrade3"
require_module = TRUE
require_model = TRUE
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -289,9 +289,9 @@
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to a mining cyborg's chassis, enabling them to withstand exposure to molten rock."
icon_state = "ash_plating"
resistance_flags = LAVA_PROOF | FIRE_PROOF
require_module = TRUE
module_type = list(/obj/item/robot_module/miner)
module_flags = BORG_MODULE_MINER
require_model = TRUE
model_type = list(/obj/item/robot_model/miner)
model_flags = BORG_MODEL_MINER
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -307,7 +307,7 @@
name = "self-repair module"
desc = "This module will repair the cyborg over time."
icon_state = "cyborg_upgrade5"
require_module = TRUE
require_model = TRUE
var/repair_amount = -1
/// world.time of next repair
var/next_repair = 0
@@ -406,18 +406,18 @@
/obj/item/borg/upgrade/hypospray
name = "medical cyborg hypospray advanced synthesiser"
desc = "An upgrade to the Medical module cyborg's hypospray, allowing it \
desc = "An upgrade to the Medical model cyborg's hypospray, allowing it \
to produce more advanced and complex medical reagents."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/medical)
module_flags = BORG_MODULE_MEDICAL
require_model = TRUE
model_type = list(/obj/item/robot_model/medical)
model_flags = BORG_MODEL_MEDICAL
var/list/additional_reagents = list()
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
for(var/obj/item/reagent_containers/borghypo/H in R.model.modules)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.add_reagent(re)
@@ -425,14 +425,14 @@
/obj/item/borg/upgrade/hypospray/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
for(var/obj/item/reagent_containers/borghypo/H in R.model.modules)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.del_reagent(re)
/obj/item/borg/upgrade/hypospray/expanded
name = "medical cyborg expanded hypospray"
desc = "An upgrade to the Medical module's hypospray, allowing it \
desc = "An upgrade to the Medical model's hypospray, allowing it \
to treat a wider range of conditions and problems."
additional_reagents = list(/datum/reagent/medicine/mannitol, /datum/reagent/medicine/oculine, /datum/reagent/medicine/inacusiate,
/datum/reagent/medicine/mutadone, /datum/reagent/medicine/haloperidol, /datum/reagent/medicine/oxandrolone, /datum/reagent/medicine/sal_acid,
@@ -448,7 +448,7 @@
. = ..()
if(.)
var/found_hypo = FALSE
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
for(var/obj/item/reagent_containers/borghypo/H in R.model.modules)
H.bypass_protection = TRUE
found_hypo = TRUE
@@ -458,17 +458,17 @@
/obj/item/borg/upgrade/piercing_hypospray/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
for(var/obj/item/reagent_containers/borghypo/H in R.model.modules)
H.bypass_protection = initial(H.bypass_protection)
/obj/item/borg/upgrade/defib
name = "medical cyborg defibrillator"
desc = "An upgrade to the Medical module, installing a built-in \
desc = "An upgrade to the Medical model, installing a built-in \
defibrillator, for on the scene revival."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/medical)
module_flags = BORG_MODULE_MEDICAL
require_model = TRUE
model_type = list(/obj/item/robot_model/medical)
model_flags = BORG_MODEL_MEDICAL
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -477,15 +477,15 @@
if(BP)
BP.deactivate(R, user)
to_chat(user, "<span class='notice'>You remove the defibrillator unit to make room for the compact upgrade.</span>")
var/obj/item/shockpaddles/cyborg/S = new(R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
var/obj/item/shockpaddles/cyborg/S = new(R.model)
R.model.basic_modules += S
R.model.add_module(S, FALSE, TRUE)
/obj/item/borg/upgrade/defib/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/shockpaddles/cyborg/S = locate() in R.module
R.module.remove_module(S, TRUE)
var/obj/item/shockpaddles/cyborg/S = locate() in R.model
R.model.remove_module(S, TRUE)
///A version of the above that also acts as a holder of an actual defibrillator item used in place of the upgrade chip.
/obj/item/borg/upgrade/defib/backpack
@@ -516,26 +516,26 @@
/obj/item/borg/upgrade/processor
name = "medical cyborg surgical processor"
desc = "An upgrade to the Medical module, installing a processor \
desc = "An upgrade to the Medical model, installing a processor \
capable of scanning surgery disks and carrying \
out procedures"
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/medical, /obj/item/robot_module/syndicate_medical)
module_flags = BORG_MODULE_MEDICAL
require_model = TRUE
model_type = list(/obj/item/robot_model/medical, /obj/item/robot_model/syndicate_medical)
model_flags = BORG_MODEL_MEDICAL
/obj/item/borg/upgrade/processor/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/surgical_processor/SP = new(R.module)
R.module.basic_modules += SP
R.module.add_module(SP, FALSE, TRUE)
var/obj/item/surgical_processor/SP = new(R.model)
R.model.basic_modules += SP
R.model.add_module(SP, FALSE, TRUE)
/obj/item/borg/upgrade/processor/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/surgical_processor/SP = locate() in R.module
R.module.remove_module(SP, TRUE)
var/obj/item/surgical_processor/SP = locate() in R.model
R.model.remove_module(SP, TRUE)
/obj/item/borg/upgrade/ai
name = "B.O.R.I.S. module"
@@ -606,9 +606,9 @@
desc = "A rapid part exchange device for the engineering cyborg."
icon = 'icons/obj/storage.dmi'
icon_state = "borgrped"
require_module = TRUE
module_type = list(/obj/item/robot_module/engineering, /obj/item/robot_module/saboteur)
module_flags = BORG_MODULE_ENGINEERING
require_model = TRUE
model_type = list(/obj/item/robot_model/engineering, /obj/item/robot_model/saboteur)
model_flags = BORG_MODEL_ENGINEERING
/obj/item/borg/upgrade/rped/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -619,39 +619,39 @@
to_chat(user, "<span class='warning'>This unit is already equipped with a RPED module!</span>")
return FALSE
RPED = new(R.module)
R.module.basic_modules += RPED
R.module.add_module(RPED, FALSE, TRUE)
RPED = new(R.model)
R.model.basic_modules += RPED
R.model.add_module(RPED, FALSE, TRUE)
/obj/item/borg/upgrade/rped/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R.module
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R.model
if (RPED)
R.module.remove_module(RPED, TRUE)
R.model.remove_module(RPED, TRUE)
/obj/item/borg/upgrade/pinpointer
name = "medical cyborg crew pinpointer"
desc = "A crew pinpointer module for the medical cyborg. Permits remote access to the crew monitor."
icon = 'icons/obj/device.dmi'
icon_state = "pinpointer_crew"
require_module = TRUE
module_type = list(/obj/item/robot_module/medical, /obj/item/robot_module/syndicate_medical)
module_flags = BORG_MODULE_MEDICAL
require_model = TRUE
model_type = list(/obj/item/robot_model/medical, /obj/item/robot_model/syndicate_medical)
model_flags = BORG_MODEL_MEDICAL
var/datum/action/crew_monitor
/obj/item/borg/upgrade/pinpointer/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/pinpointer/crew/PP = locate() in R.module
var/obj/item/pinpointer/crew/PP = locate() in R.model
if(PP)
to_chat(user, "<span class='warning'>This unit is already equipped with a pinpointer module!</span>")
return FALSE
PP = new(R.module)
R.module.basic_modules += PP
R.module.add_module(PP, FALSE, TRUE)
PP = new(R.model)
R.model.basic_modules += PP
R.model.add_module(PP, FALSE, TRUE)
crew_monitor = new /datum/action/item_action/crew_monitor(src)
crew_monitor.Grant(R)
icon_state = "scanner"
@@ -663,8 +663,8 @@
icon_state = "pinpointer_crew"
crew_monitor.Remove(R)
QDEL_NULL(crew_monitor)
var/obj/item/pinpointer/crew/PP = locate() in R.module
R.module.remove_module(PP, TRUE)
var/obj/item/pinpointer/crew/PP = locate() in R.model
R.model.remove_module(PP, TRUE)
/obj/item/borg/upgrade/pinpointer/ui_action_click()
if(..())
@@ -674,100 +674,100 @@
/obj/item/borg/upgrade/transform
name = "borg module picker (Standard)"
name = "borg model picker (Standard)"
desc = "Allows you to to turn a cyborg into a standard cyborg."
icon_state = "cyborg_upgrade3"
var/obj/item/robot_module/new_module = null
var/obj/item/robot_model/new_model = null
/obj/item/borg/upgrade/transform/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(. && new_module)
R.module.transform_to(new_module)
if(. && new_model)
R.model.transform_to(new_model)
/obj/item/borg/upgrade/transform/clown
name = "borg module picker (Clown)"
name = "borg model picker (Clown)"
desc = "Allows you to to turn a cyborg into a clown, honk."
icon_state = "cyborg_upgrade3"
new_module = /obj/item/robot_module/clown
new_model = /obj/item/robot_model/clown
/obj/item/borg/upgrade/circuit_app
name = "circuit manipulation apparatus"
desc = "An engineering cyborg upgrade allowing for manipulation of circuit boards."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/engineering, /obj/item/robot_module/saboteur)
module_flags = BORG_MODULE_ENGINEERING
require_model = TRUE
model_type = list(/obj/item/robot_model/engineering, /obj/item/robot_model/saboteur)
model_flags = BORG_MODEL_ENGINEERING
/obj/item/borg/upgrade/circuit_app/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/borg/apparatus/circuit/C = locate() in R.module.modules
var/obj/item/borg/apparatus/circuit/C = locate() in R.model.modules
if(C)
to_chat(user, "<span class='warning'>This unit is already equipped with a circuit apparatus!</span>")
return FALSE
C = new(R.module)
R.module.basic_modules += C
R.module.add_module(C, FALSE, TRUE)
C = new(R.model)
R.model.basic_modules += C
R.model.add_module(C, FALSE, TRUE)
/obj/item/borg/upgrade/circuit_app/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/borg/apparatus/circuit/C = locate() in R.module.modules
var/obj/item/borg/apparatus/circuit/C = locate() in R.model.modules
if (C)
R.module.remove_module(C, TRUE)
R.model.remove_module(C, TRUE)
/obj/item/borg/upgrade/beaker_app
name = "beaker storage apparatus"
desc = "A supplementary beaker storage apparatus for medical cyborgs."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/medical)
module_flags = BORG_MODULE_MEDICAL
require_model = TRUE
model_type = list(/obj/item/robot_model/medical)
model_flags = BORG_MODEL_MEDICAL
/obj/item/borg/upgrade/beaker_app/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/borg/apparatus/beaker/extra/E = locate() in R.module.modules
var/obj/item/borg/apparatus/beaker/extra/E = locate() in R.model.modules
if(E)
to_chat(user, "<span class='warning'>This unit has no room for additional beaker storage!</span>")
return FALSE
E = new(R.module)
R.module.basic_modules += E
R.module.add_module(E, FALSE, TRUE)
E = new(R.model)
R.model.basic_modules += E
R.model.add_module(E, FALSE, TRUE)
/obj/item/borg/upgrade/beaker_app/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/borg/apparatus/beaker/extra/E = locate() in R.module.modules
var/obj/item/borg/apparatus/beaker/extra/E = locate() in R.model.modules
if (E)
R.module.remove_module(E, TRUE)
R.model.remove_module(E, TRUE)
/obj/item/borg/upgrade/broomer
name = "experimental push broom"
desc = "An experimental push broom used for efficiently pushing refuse."
icon_state = "cyborg_upgrade3"
require_module = TRUE
module_type = list(/obj/item/robot_module/janitor)
module_flags = BORG_MODULE_JANITOR
require_model = TRUE
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
/obj/item/borg/upgrade/broomer/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if (!.)
return
var/obj/item/pushbroom/cyborg/BR = locate() in R.module.modules
var/obj/item/pushbroom/cyborg/BR = locate() in R.model.modules
if (BR)
to_chat(user, "<span class='warning'>This janiborg is already equipped with an experimental broom!</span>")
return FALSE
BR = new(R.module)
R.module.basic_modules += BR
R.module.add_module(BR, FALSE, TRUE)
BR = new(R.model)
R.model.basic_modules += BR
R.model.add_module(BR, FALSE, TRUE)
/obj/item/borg/upgrade/broomer/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (!.)
return
var/obj/item/pushbroom/cyborg/BR = locate() in R.module.modules
var/obj/item/pushbroom/cyborg/BR = locate() in R.model.modules
if (BR)
R.module.remove_module(BR, TRUE)
R.model.remove_module(BR, TRUE)

View File

@@ -217,7 +217,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
var/mob/living/silicon/robot/robot
/obj/item/claymore/highlander/robot/Initialize()
var/obj/item/robot_module/kiltkit = loc
var/obj/item/robot_model/kiltkit = loc
robot = kiltkit.loc
if(!istype(robot))
qdel(src)

View File

@@ -1679,8 +1679,8 @@
L.put_in_hands(I)
if(iscyborg(L))
var/mob/living/silicon/robot/R = L
if(R.module)
R.module.add_module(I, TRUE, TRUE)
if(R.model)
R.model.add_module(I, TRUE, TRUE)
R.activate_module(I)
if(pod)

View File

@@ -45,7 +45,7 @@
"ref" = REF(borg),
"name" = "[borg]",
"emagged" = borg.emagged,
"active_module" = "[borg.module.type]",
"active_module" = "[borg.model.type]",
"lawupdate" = borg.lawupdate,
"lockdown" = borg.lockcharge,
"scrambledcodes" = borg.scrambledcodes
@@ -53,7 +53,7 @@
.["upgrades"] = list()
for (var/upgradetype in subtypesof(/obj/item/borg/upgrade)-/obj/item/borg/upgrade/hypospray) //hypospray is a dummy parent for hypospray upgrades
var/obj/item/borg/upgrade/upgrade = upgradetype
if (initial(upgrade.module_type) && !is_type_in_list(borg.module, initial(upgrade.module_type))) // Upgrade requires a different module
if (initial(upgrade.model_type) && !is_type_in_list(borg.model, initial(upgrade.model_type))) // Upgrade requires a different model
continue
var/installed = FALSE
if (locate(upgradetype) in borg)
@@ -67,11 +67,11 @@
.["channels"] += list(list("name" = k, "installed" = (k in borg.radio.channels)))
.["cell"] = borg.cell ? list("missing" = FALSE, "maxcharge" = borg.cell.maxcharge, "charge" = borg.cell.charge) : list("missing" = TRUE, "maxcharge" = 1, "charge" = 0)
.["modules"] = list()
for(var/moduletype in typesof(/obj/item/robot_module))
var/obj/item/robot_module/module = moduletype
for(var/model_type in typesof(/obj/item/robot_model))
var/obj/item/robot_model/model = model_type
.["modules"] += list(list(
"name" = initial(module.name),
"type" = "[module]"
"name" = initial(model.name),
"type" = "[model]"
))
.["ais"] = list(list("name" = "None", "ref" = "null", "connected" = isnull(borg.connected_ai)))
for(var/mob/living/silicon/ai/ai in GLOB.ai_list)
@@ -187,11 +187,11 @@
log_admin("[key_name(user)] added the [channel] radio channel to [key_name(borg)].")
borg.radio.recalculateChannels()
if ("setmodule")
var/newmodulepath = text2path(params["module"])
if (ispath(newmodulepath))
borg.module.transform_to(newmodulepath)
message_admins("[key_name_admin(user)] changed the module of [ADMIN_LOOKUPFLW(borg)] to [newmodulepath].")
log_admin("[key_name(user)] changed the module of [key_name(borg)] to [newmodulepath].")
var/new_model_path = text2path(params["module"])
if (ispath(new_model_path))
borg.model.transform_to(new_model_path)
message_admins("[key_name_admin(user)] changed the model of [ADMIN_LOOKUPFLW(borg)] to [new_model_path].")
log_admin("[key_name(user)] changed the model of [key_name(borg)] to [new_model_path].")
if ("slavetoai")
var/mob/living/silicon/ai/newai = locate(params["slavetoai"]) in GLOB.ai_list
if (newai && newai != borg.connected_ai)

View File

@@ -184,11 +184,11 @@
switch(borg_to_spawn)
if("Medical")
R = new /mob/living/silicon/robot/modules/syndicate/medical(T)
R = new /mob/living/silicon/robot/model/syndicate/medical(T)
if("Saboteur")
R = new /mob/living/silicon/robot/modules/syndicate/saboteur(T)
R = new /mob/living/silicon/robot/model/syndicate/saboteur(T)
else
R = new /mob/living/silicon/robot/modules/syndicate(T) //Assault borg by default
R = new /mob/living/silicon/robot/model/syndicate(T) //Assault borg by default
var/brainfirstname = pick(GLOB.first_names_male)
if(prob(50))

View File

@@ -99,5 +99,5 @@
robotlander.laws.clear_inherent_laws()
robotlander.laws.set_zeroth_law("THERE CAN BE ONLY ONE")
robotlander.laws.show_laws(robotlander)
robotlander.module.transform_to(/obj/item/robot_module/syndicate/kiltborg)
sword = locate(/obj/item/claymore/highlander/robot) in robotlander.module.basic_modules
robotlander.model.transform_to(/obj/item/robot_model/syndicate/kiltborg)
sword = locate(/obj/item/claymore/highlander/robot) in robotlander.model.basic_modules

View File

@@ -87,7 +87,7 @@
src.user = user
savedName = user.name
user.name = friendlyName
user.module.cyborg_base_icon = disguise
user.model.cyborg_base_icon = disguise
user.bubble_icon = "robot"
active = TRUE
user.update_icons()
@@ -106,7 +106,7 @@
listeningTo = null
do_sparks(5, FALSE, user)
user.name = savedName
user.module.cyborg_base_icon = initial(user.module.cyborg_base_icon)
user.model.cyborg_base_icon = initial(user.model.cyborg_base_icon)
user.bubble_icon = "syndibot"
active = FALSE
user.update_icons()

View File

@@ -279,9 +279,9 @@
robot_status = "OFFLINE"
else if(!connected_robot.cell || connected_robot.cell.charge <= 0)
robot_status = "DEPOWERED"
//Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies!
//Name, Health, Battery, Model, Area, and Status! Everything an AI wants to know about its borgies!
. += text("[connected_robot.name] | S.Integrity: [connected_robot.health]% | Cell: [connected_robot.cell ? "[connected_robot.cell.charge]/[connected_robot.cell.maxcharge]" : "Empty"] | \
Module: [connected_robot.designation] | Loc: [get_area_name(connected_robot, TRUE)] | Status: [robot_status]")
Model: [connected_robot.designation] | Loc: [get_area_name(connected_robot, TRUE)] | Status: [robot_status]")
. += text("AI shell beacons detected: [LAZYLEN(GLOB.available_ai_shells)]") //Count of total AI shells
/mob/living/silicon/ai/proc/ai_alerts()

View File

@@ -23,8 +23,8 @@
if(QDELETED(item_module))
CRASH("activate_module called with improper item_module")
if(!(item_module in module.modules))
CRASH("activate_module called with item_module not in module.modules")
if(!(item_module in model.modules))
CRASH("activate_module called with item_module not in model.modules")
if(activated(item_module))
to_chat(src, "<span class='warning'>That module is already activated.</span>")
@@ -92,8 +92,8 @@
if(QDELETED(item_module))
CRASH("unequip_module_from_slot called with improper item_module")
if(!(item_module in module.modules))
CRASH("unequip_module_from_slot called with item_module not in module.modules")
if(!(item_module in model.modules))
CRASH("unequip_module_from_slot called with item_module not in model.modules")
item_module.mouse_opacity = MOUSE_OPACITY_OPAQUE
@@ -126,7 +126,7 @@
held_items[module_num] = null
item_module.cyborg_unequip(src)
item_module.forceMove(module) //Return item to module so it appears in its contents, so it can be taken out again.
item_module.forceMove(model) //Return item to configuration so it appears in its contents, so it can be taken out again.
observer_screen_update(item_module, FALSE)
hud_used.update_robot_modules_display()
@@ -404,4 +404,4 @@
cycle_modules()
/mob/living/silicon/robot/can_hold_items(obj/item/I)
return (I && (I in module.modules)) //Only if it's part of our module.
return (I && (I in model.modules)) //Only if it's part of our model.

View File

@@ -1,117 +1,3 @@
/mob/living/silicon/robot
name = "Cyborg"
real_name = "Cyborg"
icon = 'icons/mob/robots.dmi'
icon_state = "robot"
maxHealth = 100
health = 100
bubble_icon = "robot"
designation = "Default" //used for displaying the prefix & getting the current module of cyborg
has_limbs = 1
hud_type = /datum/hud/robot
radio = /obj/item/radio/borg
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
light_system = MOVABLE_LIGHT_DIRECTIONAL
light_on = FALSE
var/custom_name = ""
var/braintype = "Cyborg"
var/obj/item/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of..
var/obj/item/mmi/mmi = null
var/shell = FALSE
var/deployed = FALSE
var/mob/living/silicon/ai/mainframe = null
var/datum/action/innate/undeployment/undeployment_action = new
/// the last health before updating - to check net change in health
var/previous_health
//Hud stuff
var/atom/movable/screen/inv1 = null
var/atom/movable/screen/inv2 = null
var/atom/movable/screen/inv3 = null
var/atom/movable/screen/hands = null
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
var/atom/movable/screen/robot_modules_background
//3 Modules can be activated at any one time.
var/obj/item/robot_module/module = null
var/obj/item/module_active = null
held_items = list(null, null, null) //we use held_items for the module holding, because that makes sense to do!
/// For checking which modules are disabled or not.
var/disabled_modules
var/mutable_appearance/eye_lights
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high ///If this is a path, this gets created as an object in Initialize.
var/opened = FALSE
var/emagged = FALSE
var/emag_cooldown = 0
var/wiresexposed = FALSE
/// Random serial number generated for each cyborg upon its initialization
var/ident = 0
var/locked = TRUE
var/list/req_access = list(ACCESS_ROBOTICS)
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
var/magpulse = FALSE // Magboot-like effect.
var/ionpulse = FALSE // Jetpack-like effect.
var/ionpulse_on = FALSE // Jetpack-like effect.
var/datum/effect_system/trail_follow/ion/ion_trail // Ionpulse effect.
var/low_power_mode = 0 //whether the robot has no charge left.
var/datum/effect_system/spark_spread/spark_system // So they can initialize sparks whenever/N
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
var/scrambledcodes = FALSE // Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them.
var/lockcharge = FALSE //Boolean of whether the borg is locked down or not
var/toner = 0
var/tonermax = 40
///If the lamp isn't broken.
var/lamp_functional = TRUE
///If the lamp is turned on
var/lamp_enabled = FALSE
///Set lamp color
var/lamp_color = COLOR_WHITE
///Set to true if a doomsday event is locking our lamp to on and RED
var/lamp_doom = FALSE
///Lamp brightness. Starts at 3, but can be 1 - 5.
var/lamp_intensity = 3
///Lamp button reference
var/atom/movable/screen/robot/lamp/lampButton
var/sight_mode = 0
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
///The reference to the built-in tablet that borgs carry.
var/obj/item/modular_computer/tablet/integrated/modularInterface
var/atom/movable/screen/robot/modPC/interfaceButton
var/list/upgrades = list()
var/hasExpanded = FALSE
var/obj/item/hat
var/hat_offset = -3
can_buckle = TRUE
buckle_lying = 0
/// What types of mobs are allowed to ride/buckle to this mob
var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human)
/mob/living/silicon/robot/get_cell()
return cell
/mob/living/silicon/robot/Initialize(mapload)
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
@@ -140,8 +26,8 @@
create_modularInterface()
module = new /obj/item/robot_module(src)
module.rebuild_modules()
model = new /obj/item/robot_model(src)
model.rebuild_modules()
if(lawupdate)
make_laws()
@@ -183,12 +69,22 @@
diag_hud_set_borgcell()
logevent("System brought online.")
/mob/living/silicon/robot/model/syndicate/Initialize()
. = ..()
laws = new /datum/ai_laws/syndicate_override()
addtimer(CALLBACK(src, .proc/show_playstyle), 5)
/mob/living/silicon/robot/proc/create_modularInterface()
if(!modularInterface)
modularInterface = new /obj/item/modular_computer/tablet/integrated(src)
modularInterface.layer = ABOVE_HUD_PLANE
modularInterface.plane = ABOVE_HUD_PLANE
/mob/living/silicon/robot/model/syndicate/create_modularInterface()
if(!modularInterface)
modularInterface = new /obj/item/modular_computer/tablet/integrated/syndicate(src)
return ..()
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
/mob/living/silicon/robot/Destroy()
var/atom/T = drop_location()//To hopefully prevent run time errors.
@@ -216,7 +112,7 @@
radio.keyslot.forceMove(T)
radio.keyslot = null
QDEL_NULL(wires)
QDEL_NULL(module)
QDEL_NULL(model)
QDEL_NULL(eye_lights)
QDEL_NULL(inv1)
QDEL_NULL(inv2)
@@ -230,29 +126,32 @@
if (href_list["showalerts"])
robot_alerts()
/mob/living/silicon/robot/proc/pick_module()
if(module.type != /obj/item/robot_module)
/mob/living/silicon/robot/get_cell()
return cell
/mob/living/silicon/robot/proc/pick_model()
if(model.type != /obj/item/robot_model)
return
if(wires.is_cut(WIRE_RESET_MODULE))
to_chat(src,"<span class='userdanger'>ERROR: Module installer reply timeout. Please check internal connections.</span>")
if(wires.is_cut(WIRE_RESET_MODEL))
to_chat(src,"<span class='userdanger'>ERROR: Model installer reply timeout. Please check internal connections.</span>")
return
var/list/modulelist = list("Engineering" = /obj/item/robot_module/engineering, \
"Medical" = /obj/item/robot_module/medical, \
"Miner" = /obj/item/robot_module/miner, \
"Janitor" = /obj/item/robot_module/janitor, \
"Service" = /obj/item/robot_module/butler)
var/list/model_list = list("Engineering" = /obj/item/robot_model/engineering, \
"Medical" = /obj/item/robot_model/medical, \
"Miner" = /obj/item/robot_model/miner, \
"Janitor" = /obj/item/robot_model/janitor, \
"Service" = /obj/item/robot_model/service)
if(!CONFIG_GET(flag/disable_peaceborg))
modulelist["Peacekeeper"] = /obj/item/robot_module/peacekeeper
model_list["Peacekeeper"] = /obj/item/robot_model/peacekeeper
if(!CONFIG_GET(flag/disable_secborg))
modulelist["Security"] = /obj/item/robot_module/security
model_list["Security"] = /obj/item/robot_model/security
var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in sortList(modulelist)
if(!input_module || module.type != /obj/item/robot_module)
var/input_model = input("Please, select a model!", "Robot", null, null) as null|anything in sortList(model_list)
if(!input_model || model.type != /obj/item/robot_model)
return
module.transform_to(modulelist[input_module])
model.transform_to(model_list[input_model])
/mob/living/silicon/robot/proc/updatename(client/C)
if(shell)
@@ -333,8 +232,8 @@
else
. += text("No Cell Inserted!")
if(module)
for(var/datum/robot_energy_storage/st in module.storages)
if(model)
for(var/datum/robot_energy_storage/st in model.storages)
. += "[st.name]: [st.energy]/[st.max_energy]"
if(connected_ai)
. += "Master AI: [connected_ai.name]"
@@ -432,16 +331,16 @@
/mob/living/silicon/robot/update_icons()
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
icon_state = module.cyborg_base_icon
icon_state = model.cyborg_base_icon
if(stat != DEAD && !(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStun() || IsParalyzed() || low_power_mode)) //Not dead, not stunned.
if(!eye_lights)
eye_lights = new()
if(lamp_enabled || lamp_doom)
eye_lights.icon_state = "[module.special_light_key ? "[module.special_light_key]":"[module.cyborg_base_icon]"]_l"
eye_lights.icon_state = "[model.special_light_key ? "[model.special_light_key]":"[model.cyborg_base_icon]"]_l"
eye_lights.color = lamp_doom? COLOR_RED : lamp_color
eye_lights.plane = 19 //glowy eyes
else
eye_lights.icon_state = "[module.special_light_key ? "[module.special_light_key]":"[module.cyborg_base_icon]"]_e"
eye_lights.icon_state = "[model.special_light_key ? "[model.special_light_key]":"[model.cyborg_base_icon]"]_e"
eye_lights.color = COLOR_WHITE
eye_lights.plane = -1
eye_lights.icon = icon
@@ -520,7 +419,7 @@
/mob/living/silicon/robot/proc/SetEmagged(new_state)
emagged = new_state
module.rebuild_modules()
model.rebuild_modules()
update_icons()
if(emagged)
throw_alert("hacked", /atom/movable/screen/alert/hacked)
@@ -616,107 +515,14 @@
cell = null
qdel(src)
///This is the subtype that gets created by robot suits. It's needed so that those kind of borgs don't have a useless cell in them
/mob/living/silicon/robot/nocell
cell = null
/mob/living/silicon/robot/modules
var/set_module = /obj/item/robot_module
/mob/living/silicon/robot/modules/Initialize()
. = ..()
module.transform_to(set_module)
/mob/living/silicon/robot/modules/medical
set_module = /obj/item/robot_module/medical
icon_state = "medical"
/mob/living/silicon/robot/modules/engineering
set_module = /obj/item/robot_module/engineering
icon_state = "engineer"
/mob/living/silicon/robot/modules/security
set_module = /obj/item/robot_module/security
icon_state = "sec"
/mob/living/silicon/robot/modules/clown
set_module = /obj/item/robot_module/clown
icon_state = "clown"
/mob/living/silicon/robot/modules/peacekeeper
set_module = /obj/item/robot_module/peacekeeper
icon_state = "peace"
/mob/living/silicon/robot/modules/miner
set_module = /obj/item/robot_module/miner
icon_state = "miner"
/mob/living/silicon/robot/modules/janitor
set_module = /obj/item/robot_module/janitor
icon_state = "janitor"
/mob/living/silicon/robot/modules/syndicate
icon_state = "synd_sec"
faction = list(ROLE_SYNDICATE)
bubble_icon = "syndibot"
req_access = list(ACCESS_SYNDICATE)
lawupdate = FALSE
scrambledcodes = TRUE // These are rogue borgs.
ionpulse = TRUE
var/playstyle_string = "<span class='big bold'>You are a Syndicate assault cyborg!</span><br>\
<b>You are armed with powerful offensive tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
Your cyborg LMG will slowly produce ammunition from your power supply, and your operative pinpointer will find and locate fellow nuclear operatives. \
<i>Help the operatives secure the disk at all costs!</i></b>"
set_module = /obj/item/robot_module/syndicate
cell = /obj/item/stock_parts/cell/hyper
radio = /obj/item/radio/borg/syndicate
/mob/living/silicon/robot/modules/syndicate/Initialize()
. = ..()
laws = new /datum/ai_laws/syndicate_override()
addtimer(CALLBACK(src, .proc/show_playstyle), 5)
/mob/living/silicon/robot/modules/syndicate/create_modularInterface()
if(!modularInterface)
modularInterface = new /obj/item/modular_computer/tablet/integrated/syndicate(src)
return ..()
/mob/living/silicon/robot/modules/syndicate/proc/show_playstyle()
if(playstyle_string)
to_chat(src, playstyle_string)
/mob/living/silicon/robot/modules/syndicate/ResetModule()
return
/mob/living/silicon/robot/modules/syndicate/medical
icon_state = "synd_medical"
playstyle_string = "<span class='big bold'>You are a Syndicate medical cyborg!</span><br>\
<b>You are armed with powerful medical tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
Your hypospray will produce Restorative Nanites, a wonder-drug that will heal most types of bodily damages, including clone and brain damage. It also produces morphine for offense. \
Your defibrillator paddles can revive operatives through their hardsuits, or can be used on harm intent to shock enemies! \
Your energy saw functions as a circular saw, but can be activated to deal more damage, and your operative pinpointer will find and locate fellow nuclear operatives. \
<i>Help the operatives secure the disk at all costs!</i></b>"
set_module = /obj/item/robot_module/syndicate_medical
/mob/living/silicon/robot/modules/syndicate/saboteur
icon_state = "synd_engi"
playstyle_string = "<span class='big bold'>You are a Syndicate saboteur cyborg!</span><br>\
<b>You are armed with robust engineering tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
Your destination tagger will allow you to stealthily traverse the disposal network across the station \
Your welder will allow you to repair the operatives' exosuits, but also yourself and your fellow cyborgs \
Your cyborg chameleon projector allows you to assume the appearance and registered name of a Nanotrasen engineering borg, and undertake covert actions on the station \
Be aware that almost any physical contact or incidental damage will break your camouflage \
<i>Help the operatives secure the disk at all costs!</i></b>"
set_module = /obj/item/robot_module/saboteur
/mob/living/silicon/robot/proc/notify_ai(notifytype, oldname, newname)
if(!connected_ai)
return
switch(notifytype)
if(NEW_BORG) //New Cyborg
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='?src=[REF(connected_ai)];track=[html_encode(name)]'>[name]</a></span><br>")
if(NEW_MODULE) //New Module
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>")
if(NEW_MODEL) //New Model
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Cyborg model change detected: [name] has loaded the [designation] model.</span><br>")
if(RENAME) //New Name
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>")
if(AI_SHELL) //New Shell
@@ -732,7 +538,7 @@
/mob/living/silicon/robot/updatehealth()
..()
if(!module.breakable_modules)
if(!model.breakable_modules)
return
/// the current percent health of the robot (-1 to 1)
@@ -838,8 +644,7 @@
builtInCamera.c_tag = real_name
custom_name = newname
/mob/living/silicon/robot/proc/ResetModule()
/mob/living/silicon/robot/proc/ResetModel()
SEND_SIGNAL(src, COMSIG_BORG_SAFE_DECONSTRUCT)
uneq_all()
shown_robot_modules = FALSE
@@ -850,8 +655,8 @@
resize = 0.5
hasExpanded = FALSE
update_transform()
logevent("Chassis configuration has been reset.")
module.transform_to(/obj/item/robot_module)
logevent("Chassis model has been reset.")
model.transform_to(/obj/item/robot_model)
// Remove upgrades.
for(var/obj/item/borg/upgrade/I in upgrades)
@@ -860,32 +665,35 @@
ionpulse = FALSE
revert_shell()
return 1
return TRUE
/mob/living/silicon/robot/proc/has_module()
if(!module || module.type == /obj/item/robot_module)
/mob/living/silicon/robot/model/syndicate/ResetModel()
return
/mob/living/silicon/robot/proc/has_model()
if(!model || model.type == /obj/item/robot_model)
. = FALSE
else
. = TRUE
/mob/living/silicon/robot/proc/update_module_innate()
designation = module.name
designation = model.name
if(hands)
hands.icon_state = module.moduleselect_icon
hands.icon_state = model.model_select_icon
REMOVE_TRAITS_IN(src, MODULE_TRAIT)
if(module.module_traits)
for(var/trait in module.module_traits)
ADD_TRAIT(src, trait, MODULE_TRAIT)
REMOVE_TRAITS_IN(src, MODEL_TRAIT)
if(model.model_traits)
for(var/trait in model.model_traits)
ADD_TRAIT(src, trait, MODEL_TRAIT)
if(module.clean_on_move)
if(model.clean_on_move)
AddElement(/datum/element/cleaning)
else
RemoveElement(/datum/element/cleaning)
hat_offset = module.hat_offset
hat_offset = model.hat_offset
magpulse = module.magpulsing
magpulse = model.magpulsing
INVOKE_ASYNC(src, .proc/updatename)
@@ -1026,7 +834,6 @@
/mob/living/silicon/robot/proc/undeploy()
if(!deployed || !mind || !mainframe)
return
mainframe.redeploy_action.Grant(mainframe)
@@ -1052,10 +859,6 @@
var/mob/living/silicon/ai/AI = user
AI.deploy_to_shell(src)
/mob/living/silicon/robot/shell
shell = TRUE
cell = null
/mob/living/silicon/robot/mouse_buckle_handling(mob/living/M, mob/living/user)
//Don't try buckling on INTENT_HARM so that silicons can search people's inventories without loading them
if(can_buckle && isliving(user) && isliving(M) && !(M in buckled_mobs) && ((user != src) || (a_intent != INTENT_HARM)))
@@ -1068,7 +871,7 @@
if(stat || incapacitated())
return
if(module && !module.allow_riding)
if(model && !model.allow_riding)
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
return
@@ -1101,8 +904,8 @@
aicamera.stored[i] = TRUE
/mob/living/silicon/robot/proc/charge(datum/source, amount, repairs)
if(module)
module.respawn_consumable(src, amount * 0.005)
if(model)
model.respawn_consumable(src, amount * 0.005)
if(cell)
cell.charge = min(cell.charge + amount, cell.maxcharge)
if(repairs)

View File

@@ -113,7 +113,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if(!opened)
to_chat(user, "<span class='warning'>You must access the cyborg's internals!</span>")
return
if(!istype(module, /obj/item/robot_module/medical))
if(!istype(model, /obj/item/robot_model/medical))
to_chat(user, "<span class='warning'>[src] does not have correct mounting points for a defibrillator!</span>")
return
if(stat == DEAD)
@@ -185,8 +185,8 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if(!opened)
to_chat(user, "<span class='warning'>You must access the cyborg's internals!</span>")
return
if(!src.module && U.require_module)
to_chat(user, "<span class='warning'>The cyborg must choose a module before it can be upgraded!</span>")
if(!src.model && U.require_model)
to_chat(user, "<span class='warning'>The cyborg must choose a model before it can be upgraded!</span>")
return
if(U.locked)
to_chat(user, "<span class='warning'>The upgrade is locked and cannot be used yet!</span>")
@@ -342,7 +342,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if(shell) //AI shells cannot be emagged, so we try to make it look like a standard reset. Smart players may see through this, however.
to_chat(user, "<span class='danger'>[src] is remotely controlled! Your emag attempt has triggered a system reset instead!</span>")
log_game("[key_name(user)] attempted to emag an AI shell belonging to [key_name(src) ? key_name(src) : connected_ai]. The shell has been reset as a result.")
ResetModule()
ResetModel()
return
SetEmagged(1)

View File

@@ -0,0 +1,250 @@
/***************************************************************************************
* # robot_defines
*
* Definitions for /mob/living/silicon/robot and its children, including AI shells.
*
***************************************************************************************/
/mob/living/silicon/robot
name = "Cyborg"
real_name = "Cyborg"
icon = 'icons/mob/robots.dmi'
icon_state = "robot"
maxHealth = 100
health = 100
bubble_icon = "robot"
designation = "Default" //used for displaying the prefix & getting the current model of cyborg
has_limbs = TRUE
hud_type = /datum/hud/robot
///Represents the cyborg's model (engineering, medical, etc.)
var/obj/item/robot_model/model = null
radio = /obj/item/radio/borg
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
light_system = MOVABLE_LIGHT_DIRECTIONAL
light_on = FALSE
//AI shell
var/shell = FALSE
var/deployed = FALSE
var/mob/living/silicon/ai/mainframe = null
var/datum/action/innate/undeployment/undeployment_action = new
// ------------------------------------------ Parts
var/custom_name = ""
var/braintype = "Cyborg"
var/obj/item/mmi/mmi = null
///Used for deconstruction to remember what the borg was constructed out of.
var/obj/item/robot_suit/robot_suit = null
///If this is a path, this gets created as an object in Initialize.
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high
///If the lamp isn't broken.
var/lamp_functional = TRUE
///If the lamp is turned on
var/lamp_enabled = FALSE
///Set lamp color
var/lamp_color = COLOR_WHITE
///Set to true if a doomsday event is locking our lamp to on and RED
var/lamp_doom = FALSE
///Lamp brightness. Starts at 3, but can be 1 - 5.
var/lamp_intensity = 3
var/mutable_appearance/eye_lights
// ------------------------------------------ Hud
var/atom/movable/screen/inv1 = null
var/atom/movable/screen/inv2 = null
var/atom/movable/screen/inv3 = null
var/atom/movable/screen/hands = null
///Used to determine whether they have the module menu shown or not
var/shown_robot_modules = FALSE
var/atom/movable/screen/robot_modules_background
///Lamp button reference
var/atom/movable/screen/robot/lamp/lampButton
///The reference to the built-in tablet that borgs carry.
var/obj/item/modular_computer/tablet/integrated/modularInterface
var/atom/movable/screen/robot/modPC/interfaceButton
var/sight_mode = 0
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
// ------------------------------------------ Modules (tool slots)
var/obj/item/module_active = null
held_items = list(null, null, null) //we use held_items for the module holding, because that makes sense to do!
///For checking which modules are disabled or not.
var/disabled_modules
// ------------------------------------------ Status
var/mob/living/silicon/ai/connected_ai = null
var/opened = FALSE
var/emagged = FALSE
var/emag_cooldown = 0
var/wiresexposed = FALSE
var/lawupdate = TRUE //Cyborgs will sync their laws with their AI by default
///Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them.
var/scrambledcodes = FALSE
///Boolean of whether the borg is locked down or not
var/lockcharge = FALSE
///Random serial number generated for each cyborg upon its initialization
var/ident = 0
var/locked = TRUE
var/list/req_access = list(ACCESS_ROBOTICS)
///Whether the robot has no charge left.
var/low_power_mode = FALSE
///So they can initialize sparks whenever/N
var/datum/effect_system/spark_spread/spark_system
///Magboot-like effect.
var/magpulse = FALSE
///Jetpack-like effect.
var/ionpulse = FALSE
///Jetpack-like effect.
var/ionpulse_on = FALSE
///Ionpulse effect.
var/datum/effect_system/trail_follow/ion/ion_trail
var/alarms = list(
"Motion" = list(),
"Fire" = list(),
"Atmosphere" = list(),
"Power" = list(),
"Camera" = list(),
"Burglar" = list())
// ------------------------------------------ Misc
var/toner = 0
var/tonermax = 40
var/list/upgrades = list()
var/hasExpanded = FALSE
var/obj/item/hat
var/hat_offset = -3
///What types of mobs are allowed to ride/buckle to this mob
var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human)
can_buckle = TRUE
buckle_lying = 0
/// the last health before updating - to check net change in health
var/previous_health
/***************************************************************************************
* Defining specific kinds of robots
***************************************************************************************/
///This is the subtype that gets created by robot suits. It's needed so that those kind of borgs don't have a useless cell in them
/mob/living/silicon/robot/nocell
cell = null
/mob/living/silicon/robot/shell
shell = TRUE
cell = null
/mob/living/silicon/robot/model
var/set_model = /obj/item/robot_model
/mob/living/silicon/robot/model/Initialize()
. = ..()
model.transform_to(set_model)
// --------------------- Clown
/mob/living/silicon/robot/model/clown
set_model = /obj/item/robot_model/clown
icon_state = "clown"
// --------------------- Engineering
/mob/living/silicon/robot/model/engineering
set_model = /obj/item/robot_model/engineering
icon_state = "engineer"
// --------------------- Janitor
/mob/living/silicon/robot/model/janitor
set_model = /obj/item/robot_model/janitor
icon_state = "janitor"
// --------------------- Medical
/mob/living/silicon/robot/model/medical
set_model = /obj/item/robot_model/medical
icon_state = "medical"
// --------------------- Miner
/mob/living/silicon/robot/model/miner
set_model = /obj/item/robot_model/miner
icon_state = "miner"
// --------------------- Peacekeeper
/mob/living/silicon/robot/model/peacekeeper
set_model = /obj/item/robot_model/peacekeeper
icon_state = "peace"
// --------------------- Security
/mob/living/silicon/robot/model/security
set_model = /obj/item/robot_model/security
icon_state = "sec"
// --------------------- Service (formerly Butler)
/mob/living/silicon/robot/model/service
set_model = /obj/item/robot_model/service
icon_state = "brobot"
// ------------------------------------------ Syndie borgs
// --------------------- Syndicate Assault
/mob/living/silicon/robot/model/syndicate
icon_state = "synd_sec"
faction = list(ROLE_SYNDICATE)
bubble_icon = "syndibot"
req_access = list(ACCESS_SYNDICATE)
lawupdate = FALSE
scrambledcodes = TRUE // These are rogue borgs.
ionpulse = TRUE
var/playstyle_string = "<span class='big bold'>You are a Syndicate assault cyborg!</span><br>\
<b>You are armed with powerful offensive tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
Your cyborg LMG will slowly produce ammunition from your power supply, and your operative pinpointer will find and locate fellow nuclear operatives. \
<i>Help the operatives secure the disk at all costs!</i></b>"
set_model = /obj/item/robot_model/syndicate
cell = /obj/item/stock_parts/cell/hyper
radio = /obj/item/radio/borg/syndicate
/mob/living/silicon/robot/model/syndicate/proc/show_playstyle()
if(playstyle_string)
to_chat(src, playstyle_string)
// --------------------- Syndicate Medical
/mob/living/silicon/robot/model/syndicate/medical
icon_state = "synd_medical"
playstyle_string = "<span class='big bold'>You are a Syndicate medical cyborg!</span><br>\
<b>You are armed with powerful medical tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
Your hypospray will produce Restorative Nanites, a wonder-drug that will heal most types of bodily damages, including clone and brain damage. It also produces morphine for offense. \
Your defibrillator paddles can revive operatives through their hardsuits, or can be used on harm intent to shock enemies! \
Your energy saw functions as a circular saw, but can be activated to deal more damage, and your operative pinpointer will find and locate fellow nuclear operatives. \
<i>Help the operatives secure the disk at all costs!</i></b>"
set_model = /obj/item/robot_model/syndicate_medical
// --------------------- Syndicate Saboteur
/mob/living/silicon/robot/model/syndicate/saboteur
icon_state = "synd_engi"
playstyle_string = "<span class='big bold'>You are a Syndicate saboteur cyborg!</span><br>\
<b>You are armed with robust engineering tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
Your destination tagger will allow you to stealthily traverse the disposal network across the station \
Your welder will allow you to repair the operatives' exosuits, but also yourself and your fellow cyborgs \
Your cyborg chameleon projector allows you to assume the appearance and registered name of a Nanotrasen engineering borg, and undertake covert actions on the station \
Be aware that almost any physical contact or incidental damage will break your camouflage \
<i>Help the operatives secure the disk at all costs!</i></b>"
set_model = /obj/item/robot_model/saboteur
// --------------------- Kiltborg (Highlander)
/mob/living/silicon/robot/model/syndicate/kiltborg
set_model = /obj/item/robot_model/syndicate/kiltborg
icon_state = "peace"

View File

@@ -0,0 +1,62 @@
/***************************************************************************************
* # robot_model
*
* Definition of /obj/item/robot_model, which defines behavior for each model.
* Further expanded on in [robot_modules.dm][/obj/item/robot_model/Initialize()].
*
***************************************************************************************/
/obj/item/robot_model
name = "Default"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
w_class = WEIGHT_CLASS_GIGANTIC
inhand_icon_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
///Host of this model
var/mob/living/silicon/robot/robot
var/model_select_icon = "nomod"
///Produces the icon for the borg and, if no special_light_key is set, the lights
var/cyborg_base_icon = "robot"
///If we want specific lights, use this instead of copying lights in the dmi
var/special_light_key
// ------------------------------------------ Modules (tools)
///Holds all the usable modules (tools)
var/list/modules = list()
var/list/basic_modules = list() //a list of paths, converted to a list of instances on New()
var/list/emag_modules = list() //ditto
///Modules not inherent to the robot configuration
var/list/added_modules = list() //kept when the configuration changes
var/list/storages = list()
// ------------------------------------------ Traits
///List of traits that will be applied to the mob if this model is used.
var/list/model_traits = null
var/list/radio_channels = list()
var/magpulsing = FALSE
var/clean_on_move = FALSE
///Whether the borg loses tool slots with damage.
var/breakable_modules = TRUE
///Whether swapping to this configuration should lockcharge the borg
var/locked_transform = TRUE
var/allow_riding = TRUE
///Whether the borg can stuff itself into disposals
var/canDispose = FALSE
var/did_feedback = FALSE
// ------------------------------------------ Offsets
var/hat_offset = -3
var/list/ride_offset_x = list("north" = 0, "south" = 0, "east" = -6, "west" = 6)
var/list/ride_offset_y = list("north" = 4, "south" = 4, "east" = 3, "west" = 3)

View File

@@ -1,48 +1,12 @@
/obj/item/robot_module
name = "Default"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
w_class = WEIGHT_CLASS_GIGANTIC
inhand_icon_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
///Host of this module
var/mob/living/silicon/robot/robot
/***************************************************************************************
* # robot_modules
*
* Deals with the creation and deletion of modules (tools).
* Assigns modules and traits to a borg with a specific model selected.
*
***************************************************************************************/
var/list/basic_modules = list() //a list of paths, converted to a list of instances on New()
var/list/emag_modules = list() //ditto
var/list/modules = list() //holds all the usable modules
var/list/added_modules = list() //modules not inherient to the robot module, are kept when the module changes
var/list/storages = list()
var/list/radio_channels = list()
var/cyborg_base_icon = "robot" //produces the icon for the borg and, if no special_light_key is set, the lights
var/special_light_key //if we want specific lights, use this instead of copying lights in the dmi
var/moduleselect_icon = "nomod"
var/magpulsing = FALSE
var/clean_on_move = FALSE
var/breakable_modules = TRUE //Whether the borg loses tool slots with damage.
var/locked_transform = TRUE //Whether swapping to this module should lockcharge the borg
var/did_feedback = FALSE
var/hat_offset = -3
var/list/ride_offset_x = list("north" = 0, "south" = 0, "east" = -6, "west" = 6)
var/list/ride_offset_y = list("north" = 4, "south" = 4, "east" = 3, "west" = 3)
var/allow_riding = TRUE
var/canDispose = FALSE // Whether the borg can stuff itself into disposal
/**
* List of traits that will be applied to the mob if this module is used.
*/
var/list/module_traits = null
/obj/item/robot_module/Initialize()
/obj/item/robot_model/Initialize()
. = ..()
for(var/i in basic_modules)
var/obj/item/I = new i(src)
@@ -53,7 +17,7 @@
emag_modules += I
emag_modules -= i
/obj/item/robot_module/Destroy()
/obj/item/robot_model/Destroy()
basic_modules.Cut()
emag_modules.Cut()
modules.Cut()
@@ -61,28 +25,17 @@
storages.Cut()
return ..()
/obj/item/robot_module/emp_act(severity)
. = ..()
if(. & EMP_PROTECT_CONTENTS)
return
for(var/obj/O in modules)
O.emp_act(severity)
..()
/obj/item/robot_module/proc/get_usable_modules()
/obj/item/robot_model/proc/get_usable_modules()
. = modules.Copy()
/obj/item/robot_module/proc/get_inactive_modules()
/obj/item/robot_model/proc/get_inactive_modules()
. = list()
var/mob/living/silicon/robot/R = loc
for(var/m in get_usable_modules())
if(!(m in R.held_items))
. += m
/obj/item/robot_module/proc/get_or_create_estorage(storage_type)
return (locate(storage_type) in storages) || new storage_type(src)
/obj/item/robot_module/proc/add_module(obj/item/I, nonstandard, requires_rebuild)
/obj/item/robot_model/proc/add_module(obj/item/I, nonstandard, requires_rebuild)
if(istype(I, /obj/item/stack))
var/obj/item/stack/sheet_module = I
if(ispath(sheet_module.source, /datum/robot_energy_storage))
@@ -108,7 +61,7 @@
rebuild_modules()
return I
/obj/item/robot_module/proc/remove_module(obj/item/I, delete_after)
/obj/item/robot_model/proc/remove_module(obj/item/I, delete_after)
basic_modules -= I
modules -= I
emag_modules -= I
@@ -117,28 +70,7 @@
if(delete_after)
qdel(I)
/obj/item/robot_module/proc/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
for(var/datum/robot_energy_storage/st in storages)
st.energy = min(st.max_energy, st.energy + coeff * st.recharge_rate)
for(var/obj/item/I in get_usable_modules())
if(istype(I, /obj/item/assembly/flash))
var/obj/item/assembly/flash/F = I
F.times_used = 0
F.burnt_out = FALSE
F.update_icon()
else if(istype(I, /obj/item/melee/baton))
var/obj/item/melee/baton/B = I
if(B.cell)
B.cell.charge = B.cell.maxcharge
else if(istype(I, /obj/item/gun/energy))
var/obj/item/gun/energy/EG = I
if(!EG.chambered)
EG.recharge_newshot() //try to reload a new shot.
R.toner = R.tonermax
/obj/item/robot_module/proc/rebuild_modules() //builds the usable module list from the modules we have
/obj/item/robot_model/proc/rebuild_modules() //builds the usable module list from the modules we have
var/mob/living/silicon/robot/R = loc
var/list/held_modules = R.held_items.Copy()
var/active_module = R.module_active
@@ -159,14 +91,47 @@
if(R.hud_used)
R.hud_used.update_robot_modules_display()
/obj/item/robot_module/proc/transform_to(new_module_type)
/obj/item/robot_model/proc/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
for(var/datum/robot_energy_storage/st in storages)
st.energy = min(st.max_energy, st.energy + coeff * st.recharge_rate)
for(var/obj/item/I in get_usable_modules())
if(istype(I, /obj/item/assembly/flash))
var/obj/item/assembly/flash/F = I
F.times_used = 0
F.burnt_out = FALSE
F.update_icon()
else if(istype(I, /obj/item/melee/baton))
var/obj/item/melee/baton/B = I
if(B.cell)
B.cell.charge = B.cell.maxcharge
else if(istype(I, /obj/item/gun/energy))
var/obj/item/gun/energy/EG = I
if(!EG.chambered)
EG.recharge_newshot() //try to reload a new shot.
R.toner = R.tonermax
/obj/item/robot_model/proc/get_or_create_estorage(storage_type)
return (locate(storage_type) in storages) || new storage_type(src)
/obj/item/robot_model/emp_act(severity)
. = ..()
if(. & EMP_PROTECT_CONTENTS)
return
for(var/obj/O in modules)
O.emp_act(severity)
..()
// --------------------- Transformations
/obj/item/robot_model/proc/transform_to(new_config_type)
var/mob/living/silicon/robot/R = loc
var/obj/item/robot_module/RM = new new_module_type(R)
var/obj/item/robot_model/RM = new new_config_type(R)
RM.robot = R
if(!RM.be_transformed_to(src))
qdel(RM)
return
R.module = RM
R.model = RM
R.update_module_innate()
RM.rebuild_modules()
R.radio.recalculateChannels()
@@ -175,14 +140,14 @@
qdel(src)
return RM
/obj/item/robot_module/proc/be_transformed_to(obj/item/robot_module/old_module)
for(var/i in old_module.added_modules)
/obj/item/robot_model/proc/be_transformed_to(obj/item/robot_model/old_model)
for(var/i in old_model.added_modules)
added_modules += i
old_module.added_modules -= i
did_feedback = old_module.did_feedback
old_model.added_modules -= i
did_feedback = old_model.did_feedback
return TRUE
/obj/item/robot_module/proc/do_transform_animation()
/obj/item/robot_model/proc/do_transform_animation()
var/mob/living/silicon/robot/R = loc
if(R.hat)
R.hat.forceMove(get_turf(R))
@@ -191,7 +156,7 @@
R.setDir(SOUTH)
do_transform_delay()
/obj/item/robot_module/proc/do_transform_delay()
/obj/item/robot_model/proc/do_transform_delay()
var/mob/living/silicon/robot/R = loc
var/prev_lockcharge = R.lockcharge
sleep(1)
@@ -200,7 +165,7 @@
if(locked_transform)
R.SetLockdown(TRUE)
R.set_anchored(TRUE)
R.logevent("Chassis configuration has been set to [name].")
R.logevent("Chassis model has been set to [name].")
sleep(1)
for(var/i in 1 to 4)
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, TRUE, -1)
@@ -211,59 +176,59 @@
R.notransform = FALSE
R.updatehealth()
R.update_icons()
R.notify_ai(NEW_MODULE)
R.notify_ai(NEW_MODEL)
if(R.hud_used)
R.hud_used.update_robot_modules_display()
SSblackbox.record_feedback("tally", "cyborg_modules", 1, R.module)
SSblackbox.record_feedback("tally", "cyborg_modules", 1, R.model)
/**
* Checks if we are allowed to interact with a radial menu
*
* Arguments:
* * user The cyborg mob interacting with the menu
* * old_module The old cyborg's module
* * old_model The old cyborg's model
*/
/obj/item/robot_module/proc/check_menu(mob/living/silicon/robot/user, obj/item/robot_module/old_module)
/obj/item/robot_model/proc/check_menu(mob/living/silicon/robot/user, obj/item/robot_model/old_model)
if(!istype(user))
return FALSE
if(user.incapacitated())
return FALSE
if(user.module != old_module)
if(user.model != old_model)
return FALSE
return TRUE
/obj/item/robot_module/medical
name = "Medical"
// ------------------------------------------ Setting base model modules
// --------------------- Clown
/obj/item/robot_model/clown
name = "Clown"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/healthanalyzer,
/obj/item/reagent_containers/borghypo,
/obj/item/borg/apparatus/beaker,
/obj/item/reagent_containers/dropper,
/obj/item/reagent_containers/syringe,
/obj/item/surgical_drapes,
/obj/item/retractor,
/obj/item/hemostat,
/obj/item/cautery,
/obj/item/surgicaldrill,
/obj/item/scalpel,
/obj/item/circular_saw,
/obj/item/bonesetter,
/obj/item/extinguisher/mini,
/obj/item/roller/robo,
/obj/item/borg/cyborghug/medical,
/obj/item/stack/medical/gauze,
/obj/item/stack/medical/bone_gel,
/obj/item/organ_storage,
/obj/item/borg/lollipop)
radio_channels = list(RADIO_CHANNEL_MEDICAL)
emag_modules = list(/obj/item/reagent_containers/borghypo/hacked)
cyborg_base_icon = "medical"
moduleselect_icon = "medical"
module_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = 3
/obj/item/toy/crayon/rainbow,
/obj/item/instrument/bikehorn,
/obj/item/stamp/clown,
/obj/item/bikehorn,
/obj/item/bikehorn/airhorn,
/obj/item/paint/anycolor,
/obj/item/soap/nanotrasen,
/obj/item/pneumatic_cannon/pie/selfcharge/cyborg,
/obj/item/razor, //killbait material
/obj/item/lipstick/purple,
/obj/item/reagent_containers/spray/waterflower/cyborg,
/obj/item/borg/cyborghug/peacekeeper,
/obj/item/borg/lollipop/clown,
/obj/item/picket_sign/cyborg,
/obj/item/reagent_containers/borghypo/clown,
/obj/item/extinguisher/mini)
emag_modules = list(
/obj/item/reagent_containers/borghypo/clown/hacked,
/obj/item/reagent_containers/spray/waterflower/cyborg/hacked)
model_select_icon = "service"
cyborg_base_icon = "clown"
hat_offset = -2
/obj/item/robot_module/engineering
// --------------------- Engineering
/obj/item/robot_model/engineering
name = "Engineering"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
@@ -292,65 +257,12 @@
radio_channels = list(RADIO_CHANNEL_ENGINEERING)
emag_modules = list(/obj/item/borg/stun)
cyborg_base_icon = "engineer"
moduleselect_icon = "engineer"
model_select_icon = "engineer"
magpulsing = TRUE
hat_offset = -4
/obj/item/robot_module/security
name = "Security"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/restraints/handcuffs/cable/zipties,
/obj/item/melee/baton/loaded,
/obj/item/gun/energy/disabler/cyborg,
/obj/item/clothing/mask/gas/sechailer/cyborg,
/obj/item/extinguisher/mini)
radio_channels = list(RADIO_CHANNEL_SECURITY)
emag_modules = list(/obj/item/gun/energy/laser/cyborg)
cyborg_base_icon = "sec"
moduleselect_icon = "security"
module_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = 3
/obj/item/robot_module/security/do_transform_animation()
..()
to_chat(loc, "<span class='userdanger'>While you have picked the security module, you still have to follow your laws, NOT Space Law. \
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>")
/obj/item/robot_module/security/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
var/obj/item/gun/energy/e_gun/advtaser/cyborg/T = locate(/obj/item/gun/energy/e_gun/advtaser/cyborg) in basic_modules
if(T)
if(T.cell.charge < T.cell.maxcharge)
var/obj/item/ammo_casing/energy/S = T.ammo_type[T.select]
T.cell.give(S.e_cost * coeff)
T.update_icon()
else
T.charge_timer = 0
/obj/item/robot_module/peacekeeper
name = "Peacekeeper"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/rsf/cookiesynth,
/obj/item/harmalarm,
/obj/item/reagent_containers/borghypo/peace,
/obj/item/holosign_creator/cyborg,
/obj/item/borg/cyborghug/peacekeeper,
/obj/item/extinguisher,
/obj/item/borg/projectile_dampen)
emag_modules = list(/obj/item/reagent_containers/borghypo/peace/hacked)
cyborg_base_icon = "peace"
moduleselect_icon = "standard"
module_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = -2
/obj/item/robot_module/peacekeeper/do_transform_animation()
..()
to_chat(loc, "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>")
/obj/item/robot_module/janitor
// --------------------- Janitor
/obj/item/robot_model/janitor
name = "Janitor"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
@@ -370,7 +282,7 @@
radio_channels = list(RADIO_CHANNEL_SERVICE)
emag_modules = list(/obj/item/reagent_containers/spray/cyborg_lube)
cyborg_base_icon = "janitor"
moduleselect_icon = "janitor"
model_select_icon = "janitor"
hat_offset = -5
clean_on_move = TRUE
@@ -383,7 +295,7 @@
name = "lube spray"
list_reagents = list(/datum/reagent/lube = 250)
/obj/item/robot_module/janitor/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
/obj/item/robot_model/janitor/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
var/obj/item/lightreplacer/LR = locate(/obj/item/lightreplacer) in basic_modules
if(LR)
@@ -398,34 +310,148 @@
if(CL)
CL.reagents.add_reagent(/datum/reagent/lube, 2 * coeff)
/obj/item/robot_module/clown
name = "Clown"
// --------------------- Medical
/obj/item/robot_model/medical
name = "Medical"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/toy/crayon/rainbow,
/obj/item/instrument/bikehorn,
/obj/item/stamp/clown,
/obj/item/bikehorn,
/obj/item/bikehorn/airhorn,
/obj/item/paint/anycolor,
/obj/item/soap/nanotrasen,
/obj/item/pneumatic_cannon/pie/selfcharge/cyborg,
/obj/item/razor, //killbait material
/obj/item/lipstick/purple,
/obj/item/reagent_containers/spray/waterflower/cyborg,
/obj/item/healthanalyzer,
/obj/item/reagent_containers/borghypo,
/obj/item/borg/apparatus/beaker,
/obj/item/reagent_containers/dropper,
/obj/item/reagent_containers/syringe,
/obj/item/surgical_drapes,
/obj/item/retractor,
/obj/item/hemostat,
/obj/item/cautery,
/obj/item/surgicaldrill,
/obj/item/scalpel,
/obj/item/circular_saw,
/obj/item/bonesetter,
/obj/item/extinguisher/mini,
/obj/item/roller/robo,
/obj/item/borg/cyborghug/medical,
/obj/item/stack/medical/gauze,
/obj/item/stack/medical/bone_gel,
/obj/item/organ_storage,
/obj/item/borg/lollipop)
radio_channels = list(RADIO_CHANNEL_MEDICAL)
emag_modules = list(/obj/item/reagent_containers/borghypo/hacked)
cyborg_base_icon = "medical"
model_select_icon = "medical"
model_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = 3
// --------------------- Mining
/obj/item/robot_model/miner
name = "Miner"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/borg/sight/meson,
/obj/item/storage/bag/ore/cyborg,
/obj/item/pickaxe/drill/cyborg,
/obj/item/shovel,
/obj/item/crowbar/cyborg,
/obj/item/weldingtool/mini,
/obj/item/extinguisher/mini,
/obj/item/storage/bag/sheetsnatcher/borg,
/obj/item/gun/energy/kinetic_accelerator/cyborg,
/obj/item/gps/cyborg,
/obj/item/stack/marker_beacon)
radio_channels = list(RADIO_CHANNEL_SCIENCE, RADIO_CHANNEL_SUPPLY)
emag_modules = list(/obj/item/borg/stun)
cyborg_base_icon = "miner"
model_select_icon = "miner"
hat_offset = 0
var/obj/item/t_scanner/adv_mining_scanner/cyborg/mining_scanner //built in memes.
/obj/item/robot_model/miner/be_transformed_to(obj/item/robot_model/old_model)
var/mob/living/silicon/robot/cyborg = loc
var/list/miner_icons = list(
"Asteroid Miner" = image(icon = 'icons/mob/robots.dmi', icon_state = "minerOLD"),
"Spider Miner" = image(icon = 'icons/mob/robots.dmi', icon_state = "spidermin"),
"Lavaland Miner" = image(icon = 'icons/mob/robots.dmi', icon_state = "miner")
)
var/miner_robot_icon = show_radial_menu(cyborg, cyborg, miner_icons, custom_check = CALLBACK(src, .proc/check_menu, cyborg, old_model), radius = 38, require_near = TRUE)
switch(miner_robot_icon)
if("Asteroid Miner")
cyborg_base_icon = "minerOLD"
special_light_key = "miner"
if("Spider Miner")
cyborg_base_icon = "spidermin"
if("Lavaland Miner")
cyborg_base_icon = "miner"
else
return FALSE
return ..()
/obj/item/robot_model/miner/rebuild_modules()
. = ..()
if(!mining_scanner)
mining_scanner = new(src)
/obj/item/robot_model/miner/Destroy()
QDEL_NULL(mining_scanner)
return ..()
// --------------------- Peacekeeper
/obj/item/robot_model/peacekeeper
name = "Peacekeeper"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/rsf/cookiesynth,
/obj/item/harmalarm,
/obj/item/reagent_containers/borghypo/peace,
/obj/item/holosign_creator/cyborg,
/obj/item/borg/cyborghug/peacekeeper,
/obj/item/borg/lollipop/clown,
/obj/item/picket_sign/cyborg,
/obj/item/reagent_containers/borghypo/clown,
/obj/item/extinguisher/mini)
emag_modules = list(
/obj/item/reagent_containers/borghypo/clown/hacked,
/obj/item/reagent_containers/spray/waterflower/cyborg/hacked)
moduleselect_icon = "service"
cyborg_base_icon = "clown"
/obj/item/extinguisher,
/obj/item/borg/projectile_dampen)
emag_modules = list(/obj/item/reagent_containers/borghypo/peace/hacked)
cyborg_base_icon = "peace"
model_select_icon = "standard"
model_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = -2
/obj/item/robot_module/butler
/obj/item/robot_model/peacekeeper/do_transform_animation()
..()
to_chat(loc, "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
You are not a security member and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>")
// --------------------- Security
/obj/item/robot_model/security
name = "Security"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/restraints/handcuffs/cable/zipties,
/obj/item/melee/baton/loaded,
/obj/item/gun/energy/disabler/cyborg,
/obj/item/clothing/mask/gas/sechailer/cyborg,
/obj/item/extinguisher/mini)
radio_channels = list(RADIO_CHANNEL_SECURITY)
emag_modules = list(/obj/item/gun/energy/laser/cyborg)
cyborg_base_icon = "sec"
model_select_icon = "security"
model_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = 3
/obj/item/robot_model/security/do_transform_animation()
..()
to_chat(loc, "<span class='userdanger'>While you have picked the security configuration, you still have to follow your laws, NOT Space Law. \
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>")
/obj/item/robot_model/security/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
var/obj/item/gun/energy/e_gun/advtaser/cyborg/T = locate(/obj/item/gun/energy/e_gun/advtaser/cyborg) in basic_modules
if(T)
if(T.cell.charge < T.cell.maxcharge)
var/obj/item/ammo_casing/energy/S = T.ammo_type[T.select]
T.cell.give(S.e_cost * coeff)
T.update_icon()
else
T.charge_timer = 0
// --------------------- Service
/obj/item/robot_model/service
name = "Service"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
@@ -448,17 +474,17 @@
/obj/item/borg/apparatus/beaker/service)
radio_channels = list(RADIO_CHANNEL_SERVICE)
emag_modules = list(/obj/item/reagent_containers/borghypo/borgshaker/hacked)
moduleselect_icon = "service"
model_select_icon = "service"
special_light_key = "service"
hat_offset = 0
/obj/item/robot_module/butler/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
/obj/item/robot_model/service/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
var/obj/item/reagent_containers/O = locate(/obj/item/reagent_containers/food/condiment/enzyme) in basic_modules
if(O)
O.reagents.add_reagent(/datum/reagent/consumable/enzyme, 2 * coeff)
/obj/item/robot_module/butler/be_transformed_to(obj/item/robot_module/old_module)
/obj/item/robot_model/service/be_transformed_to(obj/item/robot_model/old_model)
var/mob/living/silicon/robot/cyborg = loc
var/list/service_icons = list(
"Bro" = image(icon = 'icons/mob/robots.dmi', icon_state = "brobot"),
@@ -467,7 +493,7 @@
"Tophat" = image(icon = 'icons/mob/robots.dmi', icon_state = "tophat"),
"Waitress" = image(icon = 'icons/mob/robots.dmi', icon_state = "service_f")
)
var/service_robot_icon = show_radial_menu(cyborg, cyborg, service_icons, custom_check = CALLBACK(src, .proc/check_menu, cyborg, old_module), radius = 38, require_near = TRUE)
var/service_robot_icon = show_radial_menu(cyborg, cyborg, service_icons, custom_check = CALLBACK(src, .proc/check_menu, cyborg, old_model), radius = 38, require_near = TRUE)
switch(service_robot_icon)
if("Bro")
cyborg_base_icon = "brobot"
@@ -487,58 +513,9 @@
return FALSE
return ..()
/obj/item/robot_module/miner
name = "Miner"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/borg/sight/meson,
/obj/item/storage/bag/ore/cyborg,
/obj/item/pickaxe/drill/cyborg,
/obj/item/shovel,
/obj/item/crowbar/cyborg,
/obj/item/weldingtool/mini,
/obj/item/extinguisher/mini,
/obj/item/storage/bag/sheetsnatcher/borg,
/obj/item/gun/energy/kinetic_accelerator/cyborg,
/obj/item/gps/cyborg,
/obj/item/stack/marker_beacon)
radio_channels = list(RADIO_CHANNEL_SCIENCE, RADIO_CHANNEL_SUPPLY)
emag_modules = list(/obj/item/borg/stun)
cyborg_base_icon = "miner"
moduleselect_icon = "miner"
hat_offset = 0
var/obj/item/t_scanner/adv_mining_scanner/cyborg/mining_scanner //built in memes.
/obj/item/robot_module/miner/be_transformed_to(obj/item/robot_module/old_module)
var/mob/living/silicon/robot/cyborg = loc
var/list/miner_icons = list(
"Asteroid Miner" = image(icon = 'icons/mob/robots.dmi', icon_state = "minerOLD"),
"Spider Miner" = image(icon = 'icons/mob/robots.dmi', icon_state = "spidermin"),
"Lavaland Miner" = image(icon = 'icons/mob/robots.dmi', icon_state = "miner")
)
var/miner_robot_icon = show_radial_menu(cyborg, cyborg, miner_icons, custom_check = CALLBACK(src, .proc/check_menu, cyborg, old_module), radius = 38, require_near = TRUE)
switch(miner_robot_icon)
if("Asteroid Miner")
cyborg_base_icon = "minerOLD"
special_light_key = "miner"
if("Spider Miner")
cyborg_base_icon = "spidermin"
if("Lavaland Miner")
cyborg_base_icon = "miner"
else
return FALSE
return ..()
/obj/item/robot_module/miner/rebuild_modules()
. = ..()
if(!mining_scanner)
mining_scanner = new(src)
/obj/item/robot_module/miner/Destroy()
QDEL_NULL(mining_scanner)
return ..()
/obj/item/robot_module/syndicate
// ------------------------------------------ Syndicate
// --------------------- Syndicate Assault
/obj/item/robot_model/syndicate
name = "Syndicate Assault"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
@@ -551,21 +528,22 @@
/obj/item/pinpointer/syndicate_cyborg)
cyborg_base_icon = "synd_sec"
moduleselect_icon = "malf"
module_traits = list(TRAIT_PUSHIMMUNE)
model_select_icon = "malf"
model_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = 3
/obj/item/robot_module/syndicate/rebuild_modules()
/obj/item/robot_model/syndicate/rebuild_modules()
..()
var/mob/living/silicon/robot/Syndi = loc
Syndi.faction -= "silicon" //ai turrets
/obj/item/robot_module/syndicate/remove_module(obj/item/I, delete_after)
/obj/item/robot_model/syndicate/remove_module(obj/item/I, delete_after)
..()
var/mob/living/silicon/robot/Syndi = loc
Syndi.faction += "silicon" //ai is your bff now!
/obj/item/robot_module/syndicate_medical
// --------------------- Syndicate Medical
/obj/item/robot_model/syndicate_medical
name = "Syndicate Medical"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
@@ -589,11 +567,12 @@
/obj/item/organ_storage)
cyborg_base_icon = "synd_medical"
moduleselect_icon = "malf"
module_traits = list(TRAIT_PUSHIMMUNE)
model_select_icon = "malf"
model_traits = list(TRAIT_PUSHIMMUNE)
hat_offset = 3
/obj/item/robot_module/saboteur
// --------------------- Syndicate Saboteur
/obj/item/robot_model/saboteur
name = "Syndicate Saboteur"
basic_modules = list(
/obj/item/assembly/flash/cyborg,
@@ -620,24 +599,25 @@
)
cyborg_base_icon = "synd_engi"
moduleselect_icon = "malf"
module_traits = list(TRAIT_PUSHIMMUNE)
model_select_icon = "malf"
model_traits = list(TRAIT_PUSHIMMUNE)
magpulsing = TRUE
hat_offset = -4
canDispose = TRUE
/obj/item/robot_module/syndicate/kiltborg
// --------------------- Kiltborg
/obj/item/robot_model/syndicate/kiltborg
name = "Highlander"
basic_modules = list(
/obj/item/claymore/highlander/robot,
/obj/item/pinpointer/nuke,)
moduleselect_icon = "kilt"
model_select_icon = "kilt"
cyborg_base_icon = "kilt"
hat_offset = -2
breakable_modules = FALSE
locked_transform = FALSE //GO GO QUICKLY AND SLAUGHTER THEM ALL
/obj/item/robot_module/syndicate/kiltborg/be_transformed_to(obj/item/robot_module/old_module)
/obj/item/robot_model/syndicate/kiltborg/be_transformed_to(obj/item/robot_model/old_model)
. = ..()
qdel(robot.radio)
robot.radio = new /obj/item/radio/borg/syndicate(robot)
@@ -647,20 +627,22 @@
var/obj/item/pinpointer/nuke/diskyfinder = locate(/obj/item/pinpointer/nuke) in basic_modules
diskyfinder.attack_self(robot)
/obj/item/robot_module/syndicate/kiltborg/do_transform_delay() //AUTO-EQUIPPING THESE TOOLS ANY EARLIER CAUSES RUNTIMES OH YEAH
/obj/item/robot_model/syndicate/kiltborg/do_transform_delay() //AUTO-EQUIPPING THESE TOOLS ANY EARLIER CAUSES RUNTIMES OH YEAH
. = ..()
robot.equip_module_to_slot(locate(/obj/item/claymore/highlander/robot) in basic_modules, 1)
robot.equip_module_to_slot(locate(/obj/item/pinpointer/nuke) in basic_modules, 2)
robot.place_on_head(new /obj/item/clothing/head/beret/highlander(robot)) //THE ONLY PART MORE IMPORTANT THAN THE SWORD IS THE HAT
ADD_TRAIT(robot.hat, TRAIT_NODROP, HIGHLANDER)
// ------------------------------------------ Storages
/datum/robot_energy_storage
var/name = "Generic energy storage"
var/max_energy = 30000
var/recharge_rate = 1000
var/energy
/datum/robot_energy_storage/New(obj/item/robot_module/R = null)
/datum/robot_energy_storage/New(obj/item/robot_model/R = null)
energy = max_energy
if(R)
R.storages |= src

View File

@@ -43,7 +43,7 @@
status = R.stat,
shell_discon = shell,
charge = R.cell ? round(R.cell.percent()) : null,
module = R.module ? "[R.module.name] Module" : "No Module Detected",
module = R.model ? "[R.model.name] Model" : "No Model Detected",
upgrades = upgrade,
ref = REF(R)
)

View File

@@ -39,7 +39,7 @@
var/mob/living/silicon/robot/borgo = tablet.borgo
data["name"] = borgo.name
data["designation"] = borgo.designation //Borgo module type
data["designation"] = borgo.model //Borgo model type
data["masterAI"] = borgo.connected_ai //Master AI
var/charge = 0
@@ -62,8 +62,8 @@
data["cover"] = "[borgo.locked? "LOCKED":"UNLOCKED"]"
//Ability to move. FAULT if lockdown wire is cut, DISABLED if borg locked, ENABLED otherwise
data["locomotion"] = "[borgo.wires.is_cut(WIRE_LOCKDOWN)?"FAULT":"[borgo.lockcharge?"DISABLED":"ENABLED"]"]"
//Module wire. FAULT if cut, NOMINAL otherwise
data["wireModule"] = "[borgo.wires.is_cut(WIRE_RESET_MODULE)?"FAULT":"NOMINAL"]"
//Model wire. FAULT if cut, NOMINAL otherwise
data["wireModule"] = "[borgo.wires.is_cut(WIRE_RESET_MODEL)?"FAULT":"NOMINAL"]"
//DEBUG -- Camera(net) wire. FAULT if cut (or no cameranet camera), DISABLED if pulse-disabled, NOMINAL otherwise
data["wireCamera"] = "[!borgo.builtInCamera || borgo.wires.is_cut(WIRE_CAMERA)?"FAULT":"[borgo.builtInCamera.can_use()?"NOMINAL":"DISABLED"]"]"
//AI wire. FAULT if wire is cut, CONNECTED if connected to AI, READY otherwise

View File

@@ -272,13 +272,13 @@
if (do_after(ninja, 60, target = src))
spark_system.start()
playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
to_chat(src, "<span class='danger'>UPLOAD COMPLETE. NEW CYBORG MODULE DETECTED. INSTALLING...</span>")
to_chat(src, "<span class='danger'>UPLOAD COMPLETE. NEW CYBORG MODEL DETECTED. INSTALLING...</span>")
faction = list(ROLE_NINJA)
bubble_icon = "syndibot"
UnlinkSelf()
ionpulse = TRUE
laws = new /datum/ai_laws/ninja_override()
module.transform_to(pick(/obj/item/robot_module/syndicate, /obj/item/robot_module/syndicate_medical, /obj/item/robot_module/saboteur))
model.transform_to(pick(/obj/item/robot_model/syndicate, /obj/item/robot_model/syndicate_medical, /obj/item/robot_model/saboteur))
var/datum/antagonist/ninja/ninja_antag = ninja.mind.has_antag_datum(/datum/antagonist/ninja)
if(!ninja_antag)

View File

@@ -238,9 +238,9 @@
icon = 'icons/obj/objects.dmi'
icon_state = "modkit"
w_class = WEIGHT_CLASS_SMALL
require_module = TRUE
module_type = list(/obj/item/robot_module/miner)
module_flags = BORG_MODULE_MINER
require_model = TRUE
model_type = list(/obj/item/robot_model/miner)
model_flags = BORG_MODEL_MINER
var/denied_type = null
var/maximum_of_type = 1
var/cost = 30
@@ -261,7 +261,7 @@
/obj/item/borg/upgrade/modkit/action(mob/living/silicon/robot/R)
. = ..()
if (.)
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/H in R.module.modules)
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/H in R.model.modules)
return install(H, usr, FALSE)
/obj/item/borg/upgrade/modkit/proc/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user, transfer_to_loc = TRUE)
@@ -298,7 +298,7 @@
/obj/item/borg/upgrade/modkit/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA in R.module.modules)
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA in R.model.modules)
uninstall(KA)
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)

View File

@@ -196,9 +196,9 @@
if("robot")
var/robot = pick(200;/mob/living/silicon/robot,
/mob/living/silicon/robot/modules/syndicate,
/mob/living/silicon/robot/modules/syndicate/medical,
/mob/living/silicon/robot/modules/syndicate/saboteur,
/mob/living/silicon/robot/model/syndicate,
/mob/living/silicon/robot/model/syndicate/medical,
/mob/living/silicon/robot/model/syndicate/saboteur,
200;/mob/living/simple_animal/drone/polymorphed)
new_mob = new robot(M.loc)
if(issilicon(new_mob))

View File

@@ -120,7 +120,7 @@
if(!iscarbon(user) && !user.ventcrawler) //only carbon and ventcrawlers can climb into disposal by themselves.
if (iscyborg(user))
var/mob/living/silicon/robot/borg = user
if (!borg.module || !borg.module.canDispose)
if (!borg.model || !borg.model.canDispose)
return
else
return

View File

@@ -679,7 +679,7 @@
category = list("Cyborg Upgrade Modules")
/datum/design/borg_transform_clown
name = "Cyborg Upgrade (Clown Module)"
name = "Cyborg Upgrade (Clown Model)"
id = "borg_transform_clown"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/transform/clown

View File

@@ -65,7 +65,7 @@
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
var/obj/item/surgical_processor/SP = locate() in R.module.modules
var/obj/item/surgical_processor/SP = locate() in R.model.modules
if(SP) //no early return for !SP since we want to check optable should this not exist.
if(replaced_by in SP.advanced_surgeries)
return FALSE

View File

@@ -126,18 +126,18 @@
// Start with checking if this design builds a cyborg module.
if(built_item in typesof(/obj/item/borg/upgrade))
var/obj/item/borg/upgrade/U = built_item
var/module_types = initial(U.module_flags)
var/model_types = initial(U.model_flags)
sub_category = list()
if(module_types)
if(module_types & BORG_MODULE_SECURITY)
if(model_types)
if(model_types & BORG_MODEL_SECURITY)
sub_category += "Security"
if(module_types & BORG_MODULE_MINER)
if(model_types & BORG_MODEL_MINER)
sub_category += "Mining"
if(module_types & BORG_MODULE_JANITOR)
if(model_types & BORG_MODEL_JANITOR)
sub_category += "Janitor"
if(module_types & BORG_MODULE_MEDICAL)
if(model_types & BORG_MODEL_MEDICAL)
sub_category += "Medical"
if(module_types & BORG_MODULE_ENGINEERING)
if(model_types & BORG_MODEL_ENGINEERING)
sub_category += "Engineering"
else
sub_category += "All Cyborgs"

View File

@@ -269,11 +269,11 @@ ALLOW_AI
ALLOW_AI_MULTICAM
## Secborg ###
## Uncomment to prevent the security cyborg module from being chosen
## Uncomment to prevent the security cyborg model from being chosen
#DISABLE_SECBORG
## Peacekeeper Borg ###
## Uncomment to prevent the peacekeeper cyborg module from being chosen
## Uncomment to prevent the peacekeeper cyborg model from being chosen
#DISABLE_PEACEBORG
## AWAY MISSIONS ###

View File

@@ -76,14 +76,14 @@ As a Scientist, you can generate research points by letting the tachyon-doppler
As a Scientist, getting drunk just enough will speed up research. Skol!
As a Roboticist, keep an ear out for anomaly announcements. If you get your hands on an anomaly core, you can build a Phazon mech!
As a Roboticist, you can repair your cyborgs with a welding tool. If they have taken burn damage, you can remove their battery, expose the wiring with a screwdriver and replace their wires with a cable coil.
As a Roboticist, you can reset a cyborg's module by cutting and mending the reset wire with a wire cutter.
As a Roboticist, you can reset a cyborg's model by cutting and mending the reset wire with a wire cutter.
As a Roboticist, you can greatly help out Shaft Miners by building a Clarke equipped with a hydraulic clamp and plasma cutter. The mech is ash storm proof and can even walk across lava!
As a Roboticist, you can augment people with cyborg limbs. Augmented limbs can easily be repaired with cables and welders.
As the AI, you can click on people's names to look at them. This only works if there are cameras that can see them, they aren't wearing agent IDs and aren't using digital camouflage as changelings.
As the AI, you can quickly open and close doors by holding shift while clicking them, bolt them when holding ctrl, and even shock them while holding alt.
As the AI, you can take pictures with your camera and upload them to newscasters.
As the AI, you can use CTRL + 1-9 to set a location hotkey for your camera, allowing you to save the location and jump to it at will. Tilde and zero will return you to the last spot you jumped from, and the numpad numbers act as aliases to the regular number keys.
As a Cyborg, choose your module carefully, as only cutting and mending your reset wire will let you repick it. If possible, refrain from choosing a module until a situation that requires one occurs.
As a Cyborg, choose your model carefully, as only cutting and mending your reset wire will let you repick it. If possible, refrain from choosing a model until a situation that requires one occurs.
As a Cyborg, you are immune to most forms of stunning, and excel at almost everything far better than humans. However, flashes can easily stunlock you and you cannot do any precision work as you lack hands.
As a Cyborg, you are impervious to fires and heat. If you are rogue, you can release plasma fires everywhere and walk through them without a care in the world!
As a Cyborg, you are extremely vulnerable to EMPs as EMPs both stun you and damage you. The ion rifle in the armory or a traitor with an EMP kit can kill you in seconds.

View File

@@ -2446,6 +2446,8 @@
#include "code\modules\mob\living\silicon\robot\login.dm"
#include "code\modules\mob\living\silicon\robot\robot.dm"
#include "code\modules\mob\living\silicon\robot\robot_defense.dm"
#include "code\modules\mob\living\silicon\robot\robot_defines.dm"
#include "code\modules\mob\living\silicon\robot\robot_model.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\robot_say.dm"

View File

@@ -83,7 +83,7 @@ export const BorgPanel = (props, context) => {
})} />
))}
</LabeledList.Item>
<LabeledList.Item label="Module">
<LabeledList.Item label="Model">
{modules.map(module => (
<Button
key={module.type}

View File

@@ -79,7 +79,7 @@ export const NtosCyborgRemoteMonitorContent = (props, context) => {
: "Not Found"}
</Box>
</LabeledList.Item>
<LabeledList.Item label="Module">
<LabeledList.Item label="Model">
{cyborg.module}
</LabeledList.Item>
<LabeledList.Item label="Upgrades">

View File

@@ -110,7 +110,7 @@ const Cyborgs = (props, context) => {
: "Not Found"}
</Box>
</LabeledList.Item>
<LabeledList.Item label="Module">
<LabeledList.Item label="Model">
{cyborg.module}
</LabeledList.Item>
<LabeledList.Item label="Master AI">