Lohikar's bugfixes (#6364)

This commit is contained in:
Mykhailo Bykhovtsev
2019-05-05 14:06:48 -07:00
committed by Werner
parent edebe4c72f
commit 15640f0286
50 changed files with 124 additions and 72 deletions
@@ -85,6 +85,12 @@
icon_state = icon_state_unpowered
cut_overlays()
if(damage >= broken_damage)
icon_state = icon_state_broken
add_overlay("broken")
return
else
icon_state = initial(icon_state)
if(!enabled)
if(icon_state_screensaver && working)
if (is_holographic)
@@ -33,15 +33,16 @@
if(damage >= max_damage)
break_apart()
update_icon()
// Stronger explosions cause serious damage to internal components
// Minor explosions are mostly mitigitated by casing.
/obj/item/modular_computer/ex_act(var/severity)
take_damage(rand(100,200) / severity, 30 / severity)
take_damage(rand(125, 200) / severity, 30 / severity)
// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components
/obj/item/modular_computer/emp_act(var/severity)
take_damage(rand(100,200) / severity, 50 / severity, 0)
take_damage(rand(100, 200) / severity, 50 / severity, 0)
// "Stun" weapons can cause minor damage to components (short-circuits?)
// "Burn" damage is equally strong against internal components and exterior casing
@@ -181,6 +181,7 @@
if(WT.remove_fuel(round(damage/75)) && do_after(usr, damage/10))
damage = 0
to_chat(user, "You repair \the [src].")
update_icon()
return
if(W.isscrewdriver())
@@ -30,6 +30,7 @@
var/icon_state_unpowered = null // Icon state when the computer is turned off
var/icon_state_menu = "menu" // Icon state overlay when the computer is turned on, but no program is loaded that would override the screen.
var/icon_state_screensaver = null
var/icon_state_broken = null
var/screensaver_light_range = 0
var/screensaver_light_color = null
var/menu_light_color = null
@@ -6,6 +6,7 @@
icon_state_unpowered = "console"
icon_state_screensaver = "standby-light"
icon_state_menu = "menu-light"
icon_state_broken = "console-broken"
menu_light_color = LIGHT_COLOR_BLUE
hardware_flag = PROGRAM_CONSOLE
anchored = TRUE
@@ -15,8 +16,6 @@
max_hardware_size = 3
steel_sheet_cost = 20
light_strength = 2
max_damage = 300
broken_damage = 150
screensaver_light_range = 1.4
screensaver_light_color = "#0099ff"
is_holographic = TRUE
@@ -6,17 +6,18 @@
icon_state_unpowered = "laptop-open"
icon = 'icons/obj/modular_laptop.dmi'
icon_state = "laptop-open"
icon_state_broken = "laptop-broken"
base_idle_power_usage = 25
base_active_power_usage = 200
max_hardware_size = 2
light_strength = 3
max_damage = 200
broken_damage = 100
max_damage = 50
broken_damage = 25
w_class = 3
var/icon_state_closed = "laptop-closed"
/obj/item/modular_computer/laptop/AltClick()
if (use_check(usr, show_messages = FALSE)) return
if (use_check(usr)) return
// Prevents carrying of open laptops inhand.
// While they work inhand, i feel it'd make tablets lose some of their high-mobility advantage they have over laptops now.
if(!istype(loc, /turf/))
@@ -31,4 +32,7 @@
..()
else
cut_overlays()
icon_state = icon_state_closed
if(damage >= broken_damage)
icon_state = icon_state_broken + "-closed"
else
icon_state = icon_state_closed
@@ -13,3 +13,4 @@
/obj/item/modular_computer/tablet/Initialize()
. = ..()
icon_state += pick("", "-blue", "-green", "-red", "-brown")
icon_state_broken = icon_state
@@ -5,6 +5,7 @@
icon_state = "telescreen"
icon_state_unpowered = "telescreen"
icon_state_menu = "menu"
icon_state_broken = "telescreen-broken"
hardware_flag = PROGRAM_TELESCREEN
anchored = TRUE
density = 0
@@ -13,8 +14,6 @@
max_hardware_size = 2
steel_sheet_cost = 10
light_strength = 4
max_damage = 300
broken_damage = 150
w_class = 5
is_holographic = TRUE