mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-31 09:00:25 +01:00
Pen Charge (#12144)
This commit is contained in:
@@ -658,3 +658,10 @@
|
||||
if(ending && !correct_punctuation[ending])
|
||||
string += "."
|
||||
return string
|
||||
|
||||
/proc/num2loadingbar(percent as num, numSquares = 20, reverse = FALSE)
|
||||
var/loadstring = ""
|
||||
var/limit = reverse ? numSquares - percent*numSquares : percent*numSquares
|
||||
for (var/i in 1 to numSquares)
|
||||
loadstring += i <= limit ? "█" : "░"
|
||||
return "\[[loadstring]\]"
|
||||
@@ -102,6 +102,12 @@
|
||||
maptext_y = 2
|
||||
var/ready_to_use = TRUE
|
||||
var/recharge_time = 1 MINUTE
|
||||
var/when_recharge = 0
|
||||
|
||||
/obj/item/syndie/teleporter/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(!ready_to_use && burglars.is_antagonist(user.mind))
|
||||
to_chat(user, SPAN_NOTICE("Charging: [num2loadingbar(world.time / when_recharge)]"))
|
||||
|
||||
/obj/item/syndie/teleporter/set_initial_maptext()
|
||||
held_maptext = SMALL_FONTS(7, "Ready")
|
||||
@@ -136,6 +142,7 @@
|
||||
addtimer(CALLBACK(src, .proc/recharge), recharge_time)
|
||||
ready_to_use = FALSE
|
||||
check_maptext(SMALL_FONTS(6, "Charge"))
|
||||
when_recharge = world.time + recharge_time
|
||||
|
||||
/obj/item/syndie/teleporter/proc/recharge()
|
||||
ready_to_use = TRUE
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Burglars can now inspect their pens to see how far their pen has charged via a loading bar."
|
||||
Reference in New Issue
Block a user