mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
@@ -1,8 +1,8 @@
|
||||
/obj/item/device/flashlight/flare
|
||||
name = "flare"
|
||||
desc = "A red standard-issue flare. There are instructions on the side reading 'pull cord, make light'."
|
||||
w_class = 2.0
|
||||
brightness_on = 4 // Pretty bright.
|
||||
w_class = ITEMSIZE_SMALL
|
||||
brightness_on = 3 // Pretty bright.
|
||||
light_power = 4
|
||||
light_color = LIGHT_COLOR_FLARE //"#E58775"
|
||||
icon_state = "flare"
|
||||
@@ -17,9 +17,11 @@
|
||||
drop_sound = 'sound/items/drop/gloves.ogg'
|
||||
pickup_sound = 'sound/items/pickup/gloves.ogg'
|
||||
|
||||
/obj/item/device/flashlight/flare/New()
|
||||
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
|
||||
..()
|
||||
var/overrides_activation_message = FALSE
|
||||
|
||||
/obj/item/device/flashlight/flare/Initialize()
|
||||
. = ..()
|
||||
fuel = rand(400, 600)
|
||||
|
||||
/obj/item/device/flashlight/flare/process()
|
||||
var/turf/pos = get_turf(src)
|
||||
@@ -39,10 +41,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='notice'>It's out of fuel.</span>")
|
||||
to_chat(user, SPAN_WARNING("It's out of fuel."))
|
||||
return
|
||||
if(on)
|
||||
return
|
||||
@@ -50,10 +51,8 @@
|
||||
. = ..()
|
||||
// All good, turn it on.
|
||||
if(.)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] activates the flare.</span>",
|
||||
"<span class='notice'>You pull the cord on the flare, activating it!</span>"
|
||||
)
|
||||
if(!overrides_activation_message)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] activates the flare."), SPAN_NOTICE("You pull the cord on the flare, activating it!"))
|
||||
src.force = on_damage
|
||||
src.damtype = "fire"
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
@@ -8,7 +8,7 @@
|
||||
)
|
||||
icon_state = "flashlight"
|
||||
item_state = "flashlight"
|
||||
w_class = 2
|
||||
w_class = ITEMSIZE_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
light_color = LIGHT_COLOR_HALOGEN
|
||||
@@ -21,12 +21,18 @@
|
||||
var/on = 0
|
||||
var/brightness_on = 3 //luminosity when on
|
||||
var/activation_sound = 'sound/items/flashlight.ogg'
|
||||
var/spawn_dir // a way for mappers to force which way a flashlight faces upon spawning
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
if (on)
|
||||
light_range = brightness_on
|
||||
update_icon()
|
||||
. = ..()
|
||||
if(light_wedge)
|
||||
set_dir(pick(NORTH, SOUTH, EAST, WEST))
|
||||
if(spawn_dir)
|
||||
set_dir(spawn_dir)
|
||||
update_light()
|
||||
|
||||
/obj/item/device/flashlight/update_icon()
|
||||
if(on)
|
||||
@@ -51,6 +57,23 @@
|
||||
user.update_action_buttons()
|
||||
return 1
|
||||
|
||||
/obj/item/device/flashlight/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(light_wedge && isturf(loc))
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [src] is facing [dir2text(dir)].")))
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
. = ..()
|
||||
if(light_wedge)
|
||||
set_dir(user.dir)
|
||||
update_light()
|
||||
|
||||
/obj/item/device/flashlight/throw_at(atom/target, range, speed, thrower, do_throw_animation)
|
||||
. = ..()
|
||||
if(light_wedge)
|
||||
var/new_dir = pick(NORTH, SOUTH, EAST, WEST)
|
||||
set_dir(new_dir)
|
||||
update_light()
|
||||
|
||||
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
/obj/item/device/flashlight/flare/glowstick
|
||||
name = "green glowstick"
|
||||
desc = "A green military-grade glowstick."
|
||||
w_class = 2
|
||||
w_class = ITEMSIZE_SMALL
|
||||
brightness_on = 1.5
|
||||
light_power = 1
|
||||
light_power = 1.5
|
||||
color = "#49F37C"
|
||||
icon_state = "glowstick"
|
||||
item_state = "glowstick"
|
||||
uv_intensity = 255
|
||||
light_wedge = LIGHT_OMNI
|
||||
activation_sound = 'sound/items/glowstick.ogg'
|
||||
overrides_activation_message = TRUE
|
||||
|
||||
/obj/item/device/flashlight/flare/glowstick/New()
|
||||
/obj/item/device/flashlight/flare/glowstick/Initialize()
|
||||
. = ..()
|
||||
fuel = rand(900, 1200)
|
||||
light_color = color
|
||||
@@ -38,9 +39,8 @@
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/device/flashlight/flare/glowstick/attack_self(var/mob/living/user)
|
||||
|
||||
if(((user.is_clumsy())) && prob(50))
|
||||
to_chat(user, span("notice", "You break \the [src] apart, spilling its contents everywhere!"))
|
||||
to_chat(user, SPAN_WARNING("You break \the [src] apart, spilling its contents everywhere!"))
|
||||
fuel = 0
|
||||
new /obj/effect/decal/cleanable/greenglow(get_turf(user))
|
||||
user.apply_effect((rand(15,30)),IRRADIATE,blocked = user.getarmor(null, "rad"))
|
||||
@@ -48,21 +48,16 @@
|
||||
return
|
||||
|
||||
if(!fuel)
|
||||
to_chat(user, span("notice", "\The [src] has already been used."))
|
||||
to_chat(user, SPAN_WARNING("\The [src] has already been used."))
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, span("notice", "\The [src] has already been turned on."))
|
||||
to_chat(user, SPAN_WARNING("\The [src] has already been turned on."))
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
if(.)
|
||||
user.visible_message(
|
||||
span("notice", "[user] cracks and shakes \the [src]."),
|
||||
span("notice", "You crack and shake \the [src], turning it on!")
|
||||
)
|
||||
update_icon()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] cracks and shakes \the [src]."), SPAN_NOTICE("You crack and shake \the [src], turning it on!"))
|
||||
|
||||
/obj/item/device/flashlight/flare/glowstick/red
|
||||
name = "red glowstick"
|
||||
@@ -89,6 +84,6 @@
|
||||
desc = "A party-grade glowstick."
|
||||
color = "#FF00FF"
|
||||
|
||||
/obj/item/device/flashlight/flare/glowstick/random/New()
|
||||
color = rgb(rand(50,255),rand(50,255),rand(50,255))
|
||||
..()
|
||||
/obj/item/device/flashlight/flare/glowstick/random/Initialize()
|
||||
color = rgb(rand(50, 255), rand(50, 255), rand(50, 255))
|
||||
. = ..()
|
||||
@@ -5,11 +5,11 @@
|
||||
icon_state = "lamp"
|
||||
item_state = "lamp"
|
||||
center_of_mass = list("x" = 13,"y" = 11)
|
||||
brightness_on = 5
|
||||
w_class = 5
|
||||
brightness_on = 4
|
||||
w_class = ITEMSIZE_HUGE
|
||||
flags = CONDUCT
|
||||
uv_intensity = 100
|
||||
on = 1
|
||||
on = TRUE
|
||||
slot_flags = 0 //No wearing desklamps
|
||||
light_wedge = LIGHT_OMNI
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/obj/item/flame/candle/Initialize()
|
||||
. = ..()
|
||||
wax = rand(800, 1000) // Enough for 27-33 minutes. 30 minutes on average.
|
||||
wax = rand(1600, 2000)
|
||||
|
||||
/obj/item/flame/candle/update_icon()
|
||||
var/i
|
||||
|
||||
@@ -152,14 +152,13 @@
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_magazine,
|
||||
/obj/item/reagent_containers/food/snacks/donut/,
|
||||
/obj/item/reagent_containers/food/snacks/donut, // kek
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/gun/energy/taser,
|
||||
/obj/item/flame/lighter,
|
||||
/obj/item/clothing/glasses/hud/security,
|
||||
/obj/item/device/flashlight/maglight,
|
||||
/obj/item/device/flashlight/flare,
|
||||
/obj/item/device/flashlight/flare/glowstick,
|
||||
/obj/item/device/pda,
|
||||
/obj/item/device/radio/headset,
|
||||
/obj/item/device/hailer,
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
autodrobe_no_remove = 1
|
||||
starts_with = list(/obj/item/clothing/mask/breath = 1,
|
||||
/obj/item/tank/emergency_oxygen = 1,
|
||||
/obj/item/device/flashlight/flare = 1
|
||||
/obj/item/device/flashlight/flare/glowstick/red = 1
|
||||
)
|
||||
|
||||
/obj/item/storage/box/survival/fill()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(prob(50))
|
||||
new /obj/item/device/flashlight(src)
|
||||
else
|
||||
new /obj/item/device/flashlight/flare(src)
|
||||
new /obj/item/device/flashlight/flare/glowstick/red(src)
|
||||
|
||||
/obj/item/storage/toolbox/mechanical
|
||||
name = "mechanical toolbox"
|
||||
|
||||
Reference in New Issue
Block a user