mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Recharger QoL Tweaks (#3826)
changes: Rechargers now briefly show a progress bar showing the current charge level of the device currently charging. Examining a recharger will now specify what is in the charger. Atoms can now mark themselves as requiring an icon update on initialize instead of overriding Initialize() just to call update_icon(). Charger code is now slightly more modular, using proc/get_cell() to get a ref to the power cell instead of hard-coded if-else chains for each supported type.
This commit is contained in:
@@ -75,6 +75,8 @@
|
||||
|
||||
var/icon_override //Used to override hardcoded clothing dmis in human clothing pr
|
||||
|
||||
var/charge_failure_message = " cannot be recharged."
|
||||
|
||||
/obj/item/Destroy()
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
@@ -84,9 +86,13 @@
|
||||
src.loc = null
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device
|
||||
icon = 'icons/obj/device.dmi'
|
||||
|
||||
/obj/item/proc/get_cell()
|
||||
return DEVICE_NO_CELL
|
||||
|
||||
//Checks if the item is being held by a mob, and if so, updates the held icons
|
||||
/obj/item/proc/update_held_icon()
|
||||
if(ismob(src.loc))
|
||||
|
||||
Reference in New Issue
Block a user