[MIRROR] [Ready] MODsuits [MDB IGNORE] (#10244)

* [Ready] MODsuits

* we dont need to add these people as codeowners, goodness gracious

* have to remove this because upstream

* part 1 of these fixes

* EEEE

* Update peacekeeper_clothing.dm

* E

* E

* Auto stash before merge of "upstream-merge-59109" and "origin/upstream-merge-59109"

* E

* Update expeditionary_trooper.dm

* more removal

* nice

* modsuti modstui modusuti

* fixes

* E

* ITS MODsuit not HARDSUIT

* more hardsuit references

* MODSUIT NOT HARSUITEDSA

* Maps

* More ,map

* oop

* e

* oo aa

* 0

* ting tang

* Update modsuit_tailsprites.dm

* hi fikou

* bs tech update

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-12-25 14:32:49 +01:00
committed by GitHub
parent 0ae11fb638
commit 58f82b5161
243 changed files with 7116 additions and 3498 deletions

View File

@@ -0,0 +1,80 @@
/obj/item/mod/control/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "MODsuit", name)
ui.open()
/obj/item/mod/control/ui_data()
var/data = list()
data["interface_break"] = interface_break
data["malfunctioning"] = malfunctioning
data["open"] = open
data["active"] = active
data["locked"] = locked
data["complexity"] = complexity
data["selected_module"] = selected_module?.name
data["wearer_name"] = wearer ? (wearer.get_authentification_name("Unknown") || "Unknown") : "No Occupant"
data["wearer_job"] = wearer ? wearer.get_assignment("Unknown", "Unknown", FALSE) : "No Job"
data["AI"] = ai?.name
data["cell"] = cell?.name
data["charge"] = cell ? round(cell.percent(), 1) : 0
data["modules"] = list()
for(var/obj/item/mod/module/module as anything in modules)
var/list/module_data = list(
name = module.name,
description = module.desc,
module_type = module.module_type,
active = module.active,
idle_power = module.idle_power_cost,
active_power = module.active_power_cost,
use_power = module.use_power_cost,
complexity = module.complexity,
cooldown_time = module.cooldown_time,
cooldown = round(COOLDOWN_TIMELEFT(module, cooldown_timer), 1 SECONDS),
id = module.tgui_id,
ref = REF(module),
configuration_data = module.get_configuration()
)
module_data += module.add_ui_data()
data["modules"] += list(module_data)
return data
/obj/item/mod/control/ui_static_data(mob/user)
var/data = list()
data["ui_theme"] = ui_theme
data["control"] = name
data["complexity_max"] = complexity_max
data["helmet"] = helmet?.name
data["chestplate"] = chestplate?.name
data["gauntlets"] = gauntlets?.name
data["boots"] = boots?.name
return data
/obj/item/mod/control/ui_act(action, params)
. = ..()
if(.)
return
if(!allowed(usr) && locked)
balloon_alert(usr, "insufficient access!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return
if(malfunctioning && prob(75))
balloon_alert(usr, "button malfunctions!")
return
switch(action)
if("lock")
locked = !locked
balloon_alert(usr, "[locked ? "locked" : "unlocked"]!")
if("activate")
toggle_activate(usr)
if("select")
var/obj/item/mod/module/module = locate(params["ref"]) in modules
if(!module)
return
module.on_select()
if("configure")
var/obj/item/mod/module/module = locate(params["ref"]) in modules
if(!module)
return
module.configure_edit(params["key"], params["value"])
return TRUE