DisplayTimeText mk2

This commit is contained in:
ShizCalev
2017-09-24 19:58:58 -04:00
committed by CitadelStationBot
parent 5b05af9036
commit 169aa85d9c
54 changed files with 428 additions and 126 deletions
@@ -15,7 +15,7 @@
max_integrity = 200
integrity_failure = 50
armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 60)
var/breakout_time = 2
var/breakout_time = 1200
var/message_cooldown
var/can_weld_shut = TRUE
var/horizontal = FALSE
@@ -366,9 +366,9 @@
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear banging from [src].</span>")
if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
if(do_after(user,(breakout_time), target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
return
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
@@ -1,3 +1,4 @@
<<<<<<< HEAD
/obj/structure/closet/crate/critter
name = "critter crate"
desc = "A crate designed for safe transport of animals. It has an oxygen tank for safe transport in space."
@@ -35,4 +36,43 @@
if(tank)
return tank.air_contents
else
=======
/obj/structure/closet/crate/critter
name = "critter crate"
desc = "A crate designed for safe transport of animals. It has an oxygen tank for safe transport in space."
icon_state = "crittercrate"
horizontal = FALSE
allow_objects = FALSE
breakout_time = 600
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 4
delivery_icon = "deliverybox"
var/obj/item/tank/internals/emergency_oxygen/tank
/obj/structure/closet/crate/critter/New()
..()
tank = new
/obj/structure/closet/crate/critter/Destroy()
var/turf/T = get_turf(src)
if(tank)
tank.forceMove(T)
tank = null
return ..()
/obj/structure/closet/crate/critter/update_icon()
cut_overlays()
if(opened)
add_overlay("crittercrate_door_open")
else
add_overlay("crittercrate_door")
if(manifest)
add_overlay("manifest")
/obj/structure/closet/crate/critter/return_air()
if(tank)
return tank.air_contents
else
>>>>>>> 74f5a8c... DisplayTimeText mk2 (#30969)
return loc.return_air()
+3 -3
View File
@@ -24,7 +24,7 @@
var/locked = FALSE
var/opendir = SOUTH
var/message_cooldown
var/breakout_time = 1
var/breakout_time = 600
/obj/structure/bodycontainer/Destroy()
open()
@@ -97,9 +97,9 @@
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
user.visible_message(null, \
"<span class='notice'>You lean on the back of [src] and start pushing the tray open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the tray open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a metallic creaking from [src].</span>")
if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
if(do_after(user,(breakout_time), target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src )
return
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \