diff --git a/baystation12.dme b/baystation12.dme index 139ebc26a95..468025060f4 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1882,10 +1882,10 @@ #include "code\modules\xgm\xgm_gas_data.dm" #include "code\modules\xgm\xgm_gas_mixture.dm" #include "code\unit_tests\equipment_tests.dm" +#include "code\unit_tests\map_tests.dm" #include "code\unit_tests\mob_tests.dm" #include "code\unit_tests\unit_test.dm" #include "code\unit_tests\zas_tests.dm" -#include "code\unit_tests\map_tests.dm" #include "code\ZAS\_docs.dm" #include "code\ZAS\Airflow.dm" #include "code\ZAS\Atom.dm" diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index ccd6ab0adb4..ef47999089b 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -55,6 +55,23 @@ return 1 +/obj/item/borg/upgrade/floodlight + name = "robot floodlight module" + desc = "Used to boost cyborg's light intensity." + icon_state = "cyborg_upgrade1" + +/obj/item/borg/upgrade/floodlight/action(var/mob/living/silicon/robot/R) + if(..()) return 0 + + if(R.intenselight) + usr << "This cyborg's light was already upgraded" + return 0 + else + R.intenselight = 1 + R.update_robot_light() + R << "Lighting systems upgrade detected." + return 1 + /obj/item/borg/upgrade/restart name = "robot emergency restart module" desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online." @@ -148,6 +165,22 @@ //R.icon_state="Miner+j" return 1 +/obj/item/borg/upgrade/rcd + name = "engineering robot RCD" + desc = "A rapid construction device module for use during construction operations." + icon_state = "cyborg_upgrade3" + require_module = 1 + +/obj/item/borg/upgrade/rcd/action(var/mob/living/silicon/robot/R) + if(..()) return 0 + + if(!R.module || !(type in R.module.supported_upgrades)) + R << "Upgrade mounting error! No suitable hardpoint detected!" + usr << "There's no mounting point for the module!" + return 0 + else + R.module.modules += new/obj/item/weapon/rcd/borg(R.module) + return 1 /obj/item/borg/upgrade/syndicate/ name = "illegal equipment module" diff --git a/code/game/objects/items/stacks/matter_synth.dm b/code/game/objects/items/stacks/matter_synth.dm index 3483dfbc61c..b18cd330aca 100644 --- a/code/game/objects/items/stacks/matter_synth.dm +++ b/code/game/objects/items/stacks/matter_synth.dm @@ -2,12 +2,15 @@ var/name = "Generic Synthesizer" var/max_energy = 60000 var/recharge_rate = 2000 + var/max_energy_multiplied = 60000 + var/multiplier = 1 // Robot may be upgraded with better matter bin to multiply capacity of it's synthetisers var/energy /datum/matter_synth/New(var/store = 0) if(store) max_energy = store - energy = max_energy + energy = max_energy_multiplied + set_multiplier(1) return /datum/matter_synth/proc/get_charge() @@ -20,10 +23,15 @@ return 0 /datum/matter_synth/proc/add_charge(var/amount) - energy = min(energy + amount, max_energy) + energy = min(energy + amount, max_energy_multiplied) /datum/matter_synth/proc/emp_act(var/severity) - use_charge(max_energy * 0.1 / severity) + use_charge(max_energy_multiplied * 0.1 / severity) + +/datum/matter_synth/proc/set_multiplier(var/new_multiplier) + multiplier = new_multiplier + max_energy_multiplied = max_energy * multiplier + energy = min(max_energy_multiplied, energy) /datum/matter_synth/medicine name = "Medicine Synthesizer" diff --git a/code/global.dm b/code/global.dm index de2b8ea92db..884ddf5bd68 100644 --- a/code/global.dm +++ b/code/global.dm @@ -147,7 +147,7 @@ var/global/list/alphabet_uppercase = list("A","B","C","D","E","F","G","H","I","J // Used by robots and robot preferences. var/list/robot_module_types = list( - "Standard", "Engineering", "Construction", "Surgeon", "Crisis", + "Standard", "Engineering", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Clerical", "Security", "Research" ) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index d355016fa5b..73ae89a9220 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -50,7 +50,10 @@ cell_use_power(50) if(lights_on) - cell_use_power(30) // 30W light. Normal lights would use ~15W, but increased for balance reasons. + if(intenselight) + cell_use_power(100) // Upgraded light. Double intensity, much larger power usage. + else + cell_use_power(30) // 30W light. Normal lights would use ~15W, but increased for balance reasons. src.has_power = 1 else diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4190c9565e7..564702b509c 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -60,6 +60,8 @@ var/obj/item/device/pda/ai/rbPDA = null + var/obj/item/weapon/stock_parts/matter_bin/storage = null + var/opened = 0 var/emagged = 0 var/wiresexposed = 0 @@ -85,6 +87,7 @@ var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them. var/tracking_entities = 0 //The number of known entities currently accessing the internal camera var/braintype = "Cyborg" + var/intenselight = 0 // Whether cyborg's integrated light was upgraded var/list/robot_verbs_default = list( /mob/living/silicon/robot/proc/sensor_mode, @@ -153,6 +156,15 @@ hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") +/mob/living/silicon/robot/proc/recalculate_synth_capacities() + if(!module || !module.synths) + return + var/mult = 1 + if(storage) + mult += storage.rating + for(var/datum/matter_synth/M in module.synths) + M.set_multiplier(mult) + /mob/living/silicon/robot/proc/init() aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src) laws = new /datum/ai_laws/nanotrasen() @@ -252,6 +264,7 @@ hands.icon_state = lowertext(modtype) feedback_inc("cyborg_[lowertext(modtype)]",1) updatename() + recalculate_synth_capacities() notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name) /mob/living/silicon/robot/proc/updatename(var/prefix as text) @@ -331,10 +344,7 @@ lights_on = !lights_on usr << "You [lights_on ? "enable" : "disable"] your integrated light." - if(lights_on) - set_light(integrated_light_power) // 1.5x luminosity of flashlight - else - set_light(0) + update_robot_light() /mob/living/silicon/robot/verb/self_diagnosis_verb() set category = "Robot Commands" @@ -374,6 +384,15 @@ C.toggled = 1 src << "\red You enable [C.name]." +/mob/living/silicon/robot/proc/update_robot_light() + if(lights_on) + if(intenselight) + set_light(integrated_light_power * 2, integrated_light_power) + else + set_light(integrated_light_power) + else + set_light(0) + // this function displays jetpack pressure in the stat panel /mob/living/silicon/robot/proc/show_jetpack_pressure() // if you have a jetpack, show the internal tank pressure @@ -409,7 +428,7 @@ stat(null, text("Lights: [lights_on ? "ON" : "OFF"]")) if(module) for(var/datum/matter_synth/ms in module.synths) - stat("[ms.name]: [ms.energy]/[ms.max_energy]") + stat("[ms.name]: [ms.energy]/[ms.max_energy_multiplied]") /mob/living/silicon/robot/restrained() return 0 @@ -529,6 +548,17 @@ user << "You open the cover." opened = 1 updateicon() + else if (istype(W, /obj/item/weapon/stock_parts/matter_bin) && opened) // Installing/swapping a matter bin + if(storage) + user << "You replace \the [storage] with \the [W]" + storage.forceMove(get_turf(src)) + storage = null + else + user << "You install \the [W]" + user.drop_item() + storage = W + W.forceMove(src) + recalculate_synth_capacities() else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside var/datum/robot_component/C = components["power cell"] diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 7abdce71d51..13be344bf04 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -9,7 +9,6 @@ var/global/list/robot_modules = list( "Security" = /obj/item/weapon/robot_module/security/general, "Combat" = /obj/item/weapon/robot_module/security/combat, "Engineering" = /obj/item/weapon/robot_module/engineering/general, - "Construction" = /obj/item/weapon/robot_module/engineering/construction, "Janitor" = /obj/item/weapon/robot_module/janitor ) @@ -310,6 +309,7 @@ var/global/list/robot_modules = list( channels = list("Engineering" = 1) networks = list(NETWORK_ENGINEERING) subsystems = list(/mob/living/silicon/proc/subsystem_power_monitor) + supported_upgrades = list(/obj/item/borg/upgrade/rcd) sprites = list( "Basic" = "Engineering", "Antique" = "engineerrobot", @@ -319,48 +319,6 @@ var/global/list/robot_modules = list( "Eyebot" = "eyebot-engineering" ) -/obj/item/weapon/robot_module/engineering/construction - name = "construction robot module" - no_slip = 1 - -/obj/item/weapon/robot_module/engineering/construction/New() - src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/borg/sight/meson(src) - src.modules += new /obj/item/weapon/extinguisher(src) - src.modules += new /obj/item/weapon/rcd/borg(src) - src.modules += new /obj/item/weapon/screwdriver(src) - src.modules += new /obj/item/weapon/wrench(src) - src.modules += new /obj/item/weapon/crowbar(src) - src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) - src.modules += new /obj/item/device/pipe_painter(src) - src.modules += new /obj/item/weapon/gripper/no_use/loader(src) - src.modules += new /obj/item/device/floor_painter(src) - - var/datum/matter_synth/metal = new /datum/matter_synth/metal() - var/datum/matter_synth/plasteel = new /datum/matter_synth/plasteel() - var/datum/matter_synth/glass = new /datum/matter_synth/glass() - synths += metal - synths += plasteel - synths += glass - - var/obj/item/stack/material/cyborg/steel/M = new (src) - M.synths = list(metal) - src.modules += M - - var/obj/item/stack/rods/cyborg/R = new /obj/item/stack/rods/cyborg(src) - R.synths = list(metal) - src.modules += R - - var/obj/item/stack/material/cyborg/plasteel/S = new (src) - S.synths = list(plasteel) - src.modules += S - - var/obj/item/stack/material/cyborg/glass/reinforced/RG = new (src) - RG.synths = list(metal, glass) - src.modules += RG - - ..() - /obj/item/weapon/robot_module/engineering/general/New() src.modules += new /obj/item/device/flash(src) src.modules += new /obj/item/borg/sight/meson(src) @@ -377,14 +335,17 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/weapon/gripper(src) src.modules += new /obj/item/device/lightreplacer(src) src.modules += new /obj/item/device/pipe_painter(src) + src.modules += new /obj/item/device/floor_painter(src) src.modules += new /obj/item/weapon/inflatable_dispenser(src) src.emag = new /obj/item/borg/stun(src) - var/datum/matter_synth/metal = new /datum/matter_synth/metal(40000) + var/datum/matter_synth/metal = new /datum/matter_synth/metal(60000) var/datum/matter_synth/glass = new /datum/matter_synth/glass(40000) + var/datum/matter_synth/plasteel = new /datum/matter_synth/plasteel(20000) var/datum/matter_synth/wire = new /datum/matter_synth/wire() synths += metal synths += glass + synths += plasteel synths += wire var/obj/item/weapon/matter_decompiler/MD = new /obj/item/weapon/matter_decompiler(src) @@ -416,6 +377,10 @@ var/global/list/robot_modules = list( RG.synths = list(metal, glass) src.modules += RG + var/obj/item/stack/material/cyborg/plasteel/PL = new (src) + PL.synths = list(plasteel) + src.modules += PL + ..() /obj/item/weapon/robot_module/security diff --git a/code/modules/research/mechfab_designs.dm b/code/modules/research/mechfab_designs.dm index 9d9e10d8f5b..674110b343c 100644 --- a/code/modules/research/mechfab_designs.dm +++ b/code/modules/research/mechfab_designs.dm @@ -334,6 +334,12 @@ id = "borg_reset_module" build_path = /obj/item/borg/upgrade/reset +/datum/design/item/robot_upgrade/floodlight + name = "Floodlight module" + desc = "Used to boost cyborg's integrated light intensity." + id = "borg_floodlight_module" + build_path = /obj/item/borg/upgrade/floodlight + /datum/design/item/robot_upgrade/restart name = "Emergency restart module" desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online." @@ -362,6 +368,13 @@ materials = list(DEFAULT_WALL_MATERIAL = 10000, "phoron" = 15000, "uranium" = 20000) build_path = /obj/item/borg/upgrade/jetpack +/datum/design/item/robot_upgrade/rcd + name = "RCD module" + desc = "A rapid construction device module for use during construction operations." + id = "borg_rcd_module" + materials = list(DEFAULT_WALL_MATERIAL = 25000, "phoron" = 10000, "gold" = 1000, "silver" = 1000) + build_path = /obj/item/borg/upgrade/rcd + /datum/design/item/robot_upgrade/syndicate name = "Illegal upgrade" desc = "Allows for the construction of lethal upgrades for cyborgs." diff --git a/html/changelogs/Atlantiscze-Robots.yml b/html/changelogs/Atlantiscze-Robots.yml new file mode 100644 index 00000000000..3870ea02f36 --- /dev/null +++ b/html/changelogs/Atlantiscze-Robots.yml @@ -0,0 +1,11 @@ +author: Atlantis + +delete-after: True + +changes: + - rscdel: "Construction robot module removed" + - rscadd: "Engineering robot module now contains most tools of construction robot, primarily plasteel. RCD is not included by default." + - rscadd: "Engineering Robot RCD upgrade is now buildable. This upgrade unlocks robot's RCD. It is fairly expensive, requiring small amount of gold and silver, as well as phoron and steel to build." + - rscadd: "Floodlight upgrade added. This upgrade doubles robot's light intensity (it will be more or less same as actual floodlight), at the cost of higher power usage." + - rscadd: "You may now install matter bin into a cyborg in order to boost it's matter synth's maximal capacity. Better matter bin adds more capacity" + - tweak: "Default capacity of matter synths for engineering module tweaked a little, since prices of reinforced walls, etc. increased recently. Steel changed from 40 to 60 sheets default, plasteel from 10 (Construction default) to 20."