Removes tablet cell parts (#71078)

## About The Pull Request

Removes cell parts and cell part cells, now tablets directly stole a
power cell in them, and uses regular stock cells like every other
machine in the game. This also makes it less confusing because people
are more used to stock cells over computer cells. Because cells
generally hold more power than computer ones, I bumped up the active
power usage from 50 to 75.

## Why It's Good For The Game

We are nearly finished removing all parts, holy cr*p

## Changelog

🆑
balance: Tablets now use regular cells instead of computer cells.
balance: Tablets no longer need a power cell component to hold power
cells.
/🆑
This commit is contained in:
John Willard
2022-11-16 02:43:44 -05:00
committed by GitHub
parent 1d256b5506
commit ad5ceb5583
21 changed files with 60 additions and 362 deletions

View File

@@ -28,10 +28,9 @@
computer.visible_message(span_notice("\The [computer]'s screen brightly flashes and loud electrical buzzing is heard."))
computer.enabled = FALSE
computer.update_appearance()
var/obj/item/computer_hardware/battery/battery_module = computer.all_components[MC_CELL]
computer.take_damage(25, BRUTE, 0, 0)
if(battery_module && prob(25))
qdel(battery_module)
if(computer.internal_cell && prob(25))
QDEL_NULL(computer.internal_cell)
computer.visible_message(span_notice("\The [computer]'s battery explodes in rain of sparks."))
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
spark_system.start()

View File

@@ -19,20 +19,17 @@
if(!computer)
return 0
var/obj/item/computer_hardware/battery/battery_module = computer.all_components[MC_CELL]
var/list/data = get_header_data()
data["disk_size"] = computer.max_capacity
data["disk_used"] = computer.used_capacity
data["power_usage"] = computer.last_power_usage
data["battery_exists"] = battery_module ? 1 : 0
if(battery_module?.battery)
data["battery_rating"] = battery_module.battery.maxcharge
data["battery_percent"] = round(battery_module.battery.percent())
if(battery_module?.battery)
data["battery"] = list("max" = battery_module.battery.maxcharge, "charge" = round(battery_module.battery.charge))
data["battery"] = null
if(computer.internal_cell)
data["battery"] = list(
"max" = computer.internal_cell.maxcharge,
"charge" = round(computer.internal_cell.charge),
)
var/list/all_entries[0]
for(var/I in computer.all_components)
@@ -42,8 +39,8 @@
"desc" = H.desc,
"enabled" = H.enabled,
"critical" = H.critical,
"powerusage" = H.power_usage
)))
"powerusage" = H.power_usage,
)))
data["hardware"] = all_entries
return data