mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
The way silicon radios and cells get created is now more sane. (#45371)
About The Pull Request See title. Fixes #45370 Why It's Good For The Game I don't think duplication of powercells and a bunch of duplicate code is really needed. This is more easily maintainable and just not shit in general. EDIT: oh forgot to mention that this causes syndiborgs to have 500 more max charge by default. If anyone is extremely triggered by this, I can change that. But since those things aren't finely tuned anyways, I don't think this is a big deal. Changelog cl code: Changed how sillycones get their cells and radios. /cl
This commit is contained in:
@@ -271,7 +271,7 @@
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot/nocell(get_turf(loc))
|
||||
if(!O)
|
||||
return
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
sec_hud = DATA_HUD_SECURITY_BASIC
|
||||
d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
radio = /obj/item/radio/headset/silicon/ai
|
||||
var/battery = 200 //emergency power if the AI's APC is off
|
||||
var/list/network = list("ss13")
|
||||
var/obj/machinery/camera/current
|
||||
@@ -148,7 +149,6 @@
|
||||
aiPDA.name = real_name + " (" + aiPDA.ownjob + ")"
|
||||
|
||||
aiMulti = new(src)
|
||||
radio = new /obj/item/radio/headset/silicon/ai(src)
|
||||
aicamera = new/obj/item/camera/siliconcam/ai_camera(src)
|
||||
|
||||
deploy_action.Grant(src)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
maxHealth = 500
|
||||
layer = BELOW_MOB_LAYER
|
||||
can_be_held = TRUE
|
||||
radio = /obj/item/radio/headset/silicon/pai
|
||||
var/network = "ss13"
|
||||
var/obj/machinery/camera/current = null
|
||||
|
||||
@@ -111,8 +112,6 @@
|
||||
job = "Personal AI"
|
||||
signaler = new(src)
|
||||
hostscan = new /obj/item/healthanalyzer(src)
|
||||
if(!radio)
|
||||
radio = new /obj/item/radio/headset/silicon/pai(src)
|
||||
newscaster = new /obj/machinery/newscaster(src)
|
||||
if(!aicamera)
|
||||
aicamera = new /obj/item/camera/siliconcam/ai_camera(src)
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
has_limbs = 1
|
||||
hud_type = /datum/hud/robot
|
||||
|
||||
radio = /obj/item/radio/borg
|
||||
|
||||
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..
|
||||
@@ -40,7 +42,7 @@
|
||||
var/mutable_appearance/eye_lights
|
||||
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/stock_parts/cell/cell = 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 = 0
|
||||
var/emagged = FALSE
|
||||
@@ -111,15 +113,14 @@
|
||||
|
||||
ident = rand(1, 999)
|
||||
|
||||
if(!cell)
|
||||
cell = new /obj/item/stock_parts/cell/high(src)
|
||||
if(ispath(cell))
|
||||
cell = new cell(src)
|
||||
|
||||
if(lawupdate)
|
||||
make_laws()
|
||||
if(!TryConnectToAI())
|
||||
lawupdate = FALSE
|
||||
|
||||
radio = new /obj/item/radio/borg(src)
|
||||
if(!scrambledcodes && !builtInCamera)
|
||||
builtInCamera = new (src)
|
||||
builtInCamera.c_tag = real_name
|
||||
@@ -765,6 +766,10 @@
|
||||
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
|
||||
|
||||
@@ -816,11 +821,11 @@
|
||||
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()
|
||||
. = ..()
|
||||
cell = new /obj/item/stock_parts/cell/hyper(src, 25000)
|
||||
radio = new /obj/item/radio/borg/syndicate(src)
|
||||
laws = new /datum/ai_laws/syndicate_override()
|
||||
addtimer(CALLBACK(src, .proc/show_playstyle), 5)
|
||||
|
||||
@@ -1129,6 +1134,7 @@
|
||||
|
||||
/mob/living/silicon/robot/shell
|
||||
shell = TRUE
|
||||
cell = null
|
||||
|
||||
/mob/living/silicon/robot/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/obj/item/camera/siliconcam/aicamera = null //photography
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
var/obj/item/radio/borg/radio = null //All silicons make use of this, with (p)AI's creating headsets
|
||||
var/obj/item/radio/borg/radio = null ///If this is a path, this gets created as an object in Initialize.
|
||||
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
@@ -51,6 +51,8 @@
|
||||
. = ..()
|
||||
GLOB.silicon_mobs += src
|
||||
faction += "silicon"
|
||||
if(ispath(radio))
|
||||
radio = new radio(src)
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
diag_hud.add_to_hud(src)
|
||||
diag_hud_set_status()
|
||||
|
||||
Reference in New Issue
Block a user