mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Material datum chairs & tables and applies materials to all items (Now with less pain for mining & RnD) (#46525)
removes materials list from items, uses custom_materials instead. This might introduce some bugs so we should testmerge this for a while (and Ill test stuff locally as much as I can) this also adds material crafting to sheets. Test case being chairs. In the future we can add stuff like tables, walls, doors etc. also applies materials to everything, with fixes, which can close #46299
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
var/max_hardware_size = 0 // Maximal hardware w_class. Tablets/PDAs have 1, laptops 2, consoles 4.
|
||||
var/steel_sheet_cost = 5 // Amount of steel sheets refunded when disassembling an empty frame of this computer.
|
||||
|
||||
integrity_failure = 50
|
||||
integrity_failure = 0.5
|
||||
max_integrity = 100
|
||||
armor = list("melee" = 0, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
/obj/item/modular_computer/examine(mob/user)
|
||||
. = ..()
|
||||
if(obj_integrity <= integrity_failure)
|
||||
if(obj_integrity <= integrity_failure * max_integrity)
|
||||
. += "<span class='danger'>It is heavily damaged!</span>"
|
||||
else if(obj_integrity < max_integrity)
|
||||
. += "<span class='warning'>It is damaged.</span>"
|
||||
@@ -206,7 +206,7 @@
|
||||
else
|
||||
add_overlay(icon_state_menu)
|
||||
|
||||
if(obj_integrity <= integrity_failure)
|
||||
if(obj_integrity <= integrity_failure * max_integrity)
|
||||
add_overlay("bsod")
|
||||
add_overlay("broken")
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
|
||||
/obj/item/modular_computer/proc/turn_on(mob/user)
|
||||
var/issynth = issilicon(user) // Robots and AIs get different activation messages.
|
||||
if(obj_integrity <= integrity_failure)
|
||||
if(obj_integrity <= integrity_failure * max_integrity)
|
||||
if(issynth)
|
||||
to_chat(user, "<span class='warning'>You send an activation signal to \the [src], but it responds with an error code. It must be damaged.</span>")
|
||||
else
|
||||
@@ -252,7 +252,7 @@
|
||||
last_power_usage = 0
|
||||
return 0
|
||||
|
||||
if(obj_integrity <= integrity_failure)
|
||||
if(obj_integrity <= integrity_failure * max_integrity)
|
||||
shutdown_computer()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
else
|
||||
add_overlay(screen_icon_state_menu)
|
||||
|
||||
if(cpu && cpu.obj_integrity <= cpu.integrity_failure)
|
||||
if(cpu && cpu.obj_integrity <= cpu.integrity_failure * cpu.max_integrity)
|
||||
add_overlay("bsod")
|
||||
add_overlay("broken")
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
steel_sheet_cost = 10
|
||||
light_strength = 2
|
||||
max_integrity = 300
|
||||
integrity_failure = 150
|
||||
integrity_failure = 0.5
|
||||
var/console_department = "" // Used in New() to set network tag according to our area.
|
||||
|
||||
/obj/machinery/modular_computer/console/buildable/Initialize()
|
||||
@@ -52,4 +52,4 @@
|
||||
network_card.identification_string = "Unknown Console"
|
||||
if(cpu)
|
||||
cpu.screen_on = 1
|
||||
update_icon()
|
||||
update_icon()
|
||||
|
||||
Reference in New Issue
Block a user