mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Cleaning up robot code: modules renamed to models & DOGBORG REWORK (#2837)
* Cleaning up robot code: modules renamed to models * Merge branch 'master' into upstream-merge-56312 * [PR Fix] Modular_Skyrat borgos (#3019) * No more linter complaining * Halfway (or full way, I don't know) through moving stuff around * Caps! * a Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com> Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
co-authored by
dragomagol
Gandalf2k15
Funce
parent
30906a3b4d
commit
25df6e7da3
@@ -1575,8 +1575,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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user