mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 02:01:22 +00: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:
@@ -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
|
||||
@@ -210,7 +209,7 @@
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(!R.module)
|
||||
if(!R.model)
|
||||
return
|
||||
|
||||
if(!R.client)
|
||||
@@ -220,21 +219,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)
|
||||
@@ -253,7 +252,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
|
||||
|
||||
Reference in New Issue
Block a user