Robot_module and cyborg stack refactor (#13527)

* robot_module refactor

* some fixes

1. adds medical stacks of 25 for the syndi medical borg
2. fixes various construction steps that weren't using `use()` or `get_amount()`

* review tweaks + other stuff

1. Makes a bunch of for loops into istypeless loops
2. Adds a readout of the current out of stacks a borg has, in the status panel
3. Slightly reorganizes the medical, syndi medical, engineering and syndi engineering cyborgs items

* fixes after upstream merge

* blank line for travis

* fixes and improvements

1. Fixed welder icon's not updating periodically if you were charging in a borg recharger
2. Fixes solar panels dropping /cyborg type glass when they were deconstructed.
3. Band-aid fix (incase #2 doesn't fix this) for cyborg stack's `source` var being null which resulted in tons of "cannot read null.energy" runtimes

* more fixes + constructable frame runtime fix

* removes toy sword placeholder

remove comment

* remove these as well

* .amount to .get_amount(), really should have done this before

* refactors robot_upgrades to work with the new system

- more cleanup
- adds documentation
- fixed a bug I made where you could delete your robot stack via crafting

* moves some unemag logic to the module file, makes more loops typless

* farie review

* fox review

* affected review and more TM bugfixes

* fixes comment

Co-authored-by: SteelSlayer <SteelSlayer@users.noreply.github.com>
This commit is contained in:
SteelSlayer
2021-05-24 16:24:25 +01:00
committed by GitHub
co-authored by SteelSlayer
parent 663eff7b5e
commit e4bbd94d6a
46 changed files with 1057 additions and 914 deletions
-19
View File
@@ -78,15 +78,6 @@
var/mob/living/silicon/robot/R = usr
R.toggle_ionpulse()
/obj/screen/robot/panel
name = "installed modules"
icon_state = "panel"
/obj/screen/robot/panel/Click()
if(issilicon(usr))
var/mob/living/silicon/robot/R = usr
R.installed_modules()
/obj/screen/robot/mov_intent
name = "fast/slow toggle"
icon_state = "running"
@@ -224,16 +215,6 @@
var/x = -4 //Start at CENTER-4,SOUTH+1
var/y = 1
//Unfortunately adding the emag module to the list of modules has to be here. This is because a borg can
//be emagged before they actually select a module. - or some situation can cause them to get a new module
// - or some situation might cause them to get de-emagged or something.
if(R.emagged || R.weapons_unlock)
if(!(R.module.emag in R.module.modules))
R.module.modules.Add(R.module.emag)
else
if(R.module.emag in R.module.modules)
R.module.modules.Remove(R.module.emag)
for(var/atom/movable/A in R.module.modules)
if( (A != R.module_state_1) && (A != R.module_state_2) && (A != R.module_state_3) )
//Module is not currently active