diff --git a/code/game/objects/items/devices/lighting/flare.dm b/code/game/objects/items/devices/lighting/flare.dm
index e8b1f294f09..25cce20b6f1 100644
--- a/code/game/objects/items/devices/lighting/flare.dm
+++ b/code/game/objects/items/devices/lighting/flare.dm
@@ -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, "It's out of fuel.")
+ 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(
- "[user] activates the flare.",
- "You pull the cord on the flare, activating it!"
- )
+ 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)
\ No newline at end of file
diff --git a/code/game/objects/items/devices/lighting/flashlight.dm b/code/game/objects/items/devices/lighting/flashlight.dm
index 745b4eb8149..327746df4bc 100644
--- a/code/game/objects/items/devices/lighting/flashlight.dm
+++ b/code/game/objects/items/devices/lighting/flashlight.dm
@@ -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)
diff --git a/code/game/objects/items/devices/lighting/glowstick.dm b/code/game/objects/items/devices/lighting/glowstick.dm
index 88512f4f3ea..3c758126d2b 100644
--- a/code/game/objects/items/devices/lighting/glowstick.dm
+++ b/code/game/objects/items/devices/lighting/glowstick.dm
@@ -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))
- ..()
\ No newline at end of file
+/obj/item/device/flashlight/flare/glowstick/random/Initialize()
+ color = rgb(rand(50, 255), rand(50, 255), rand(50, 255))
+ . = ..()
\ No newline at end of file
diff --git a/code/game/objects/items/devices/lighting/lamp.dm b/code/game/objects/items/devices/lighting/lamp.dm
index 154cc9098c3..d82ebc82f1a 100644
--- a/code/game/objects/items/devices/lighting/lamp.dm
+++ b/code/game/objects/items/devices/lighting/lamp.dm
@@ -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
diff --git a/code/game/objects/items/weapons/candle.dm b/code/game/objects/items/weapons/candle.dm
index a5620cbffa2..f8d3835a2f8 100644
--- a/code/game/objects/items/weapons/candle.dm
+++ b/code/game/objects/items/weapons/candle.dm
@@ -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
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index 8b273c316bb..8d21a8ca1ca 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -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,
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index 5bc071aac15..cf1c51461e6 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -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()
diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm
index e3bb5c1a466..0f3969b916a 100644
--- a/code/game/objects/items/weapons/storage/toolbox.dm
+++ b/code/game/objects/items/weapons/storage/toolbox.dm
@@ -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"
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 00f9ad51505..be69cb04266 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -260,7 +260,7 @@
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
new /obj/item/device/holowarrant(src)
- new /obj/item/device/flashlight/flare(src)
+ new /obj/item/device/flashlight/flare/glowstick/red(src)
//Belts
if (prob(50))
new /obj/item/clothing/accessory/storage/black_vest(src)
@@ -303,7 +303,7 @@
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
new /obj/item/device/holowarrant(src)
- new /obj/item/device/flashlight/flare(src)
+ new /obj/item/device/flashlight/flare/glowstick/red(src)
new /obj/item/handcuffs(src)
//Belts
if (prob(50))
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index 79a7690e2f4..d6220ad536c 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -43,8 +43,8 @@
slot_r_hand_str = 'icons/mob/items/righthand_mining.dmi',
)
light_power = 1
- brightness_on = 6
- light_wedge = LIGHT_OMNI
+ brightness_on = 4
+ light_wedge = 120
light_color = LIGHT_COLOR_FIRE
/*****************************Pickaxe********************************/
diff --git a/code/modules/mob/living/carbon/human/species/station/diona/diona.dm b/code/modules/mob/living/carbon/human/species/station/diona/diona.dm
index 1d288810edd..11eec442ecb 100644
--- a/code/modules/mob/living/carbon/human/species/station/diona/diona.dm
+++ b/code/modules/mob/living/carbon/human/species/station/diona/diona.dm
@@ -160,12 +160,6 @@
/datum/species/diona/get_vision_organ(mob/living/carbon/human/H)
return H.organs_by_name[vision_organ]
-/datum/species/diona/equip_later_gear(var/mob/living/carbon/human/H)
- if(istype(H.get_equipped_item(slot_back), /obj/item/storage/backpack))
- H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H.back), slot_in_backpack)
- else
- H.equip_to_slot_or_del(new /obj/item/device/flashlight/flare(H), slot_r_hand)
-
/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H)
if (ishuman(H))
return ..()
diff --git a/code/modules/power/lights/bulbs.dm b/code/modules/power/lights/bulbs.dm
index 104323eb4aa..2cf64c276ca 100644
--- a/code/modules/power/lights/bulbs.dm
+++ b/code/modules/power/lights/bulbs.dm
@@ -7,7 +7,7 @@
icon = 'icons/obj/lighting.dmi'
force = 2
throwforce = 5
- w_class = 1
+ w_class = ITEMSIZE_TINY
matter = list(DEFAULT_WALL_MATERIAL = 60)
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/switchcount = 0 // number of times switched
@@ -55,7 +55,7 @@
brightness_color = LIGHT_COLOR_CYAN
/obj/item/light/tube/large
- w_class = 2
+ w_class = ITEMSIZE_SMALL
name = "large light tube"
brightness_range = 15
brightness_power = 6
@@ -150,14 +150,14 @@
if(istype(I, /obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/S = I
- to_chat(user, "You inject the solution into the [src].")
+ to_chat(user, SPAN_NOTICE("You inject the solution into \the [src]."))
if(S.reagents.has_reagent("phoron", 5))
log_admin("LOG: [user.name] ([user.ckey]) injected a light with phoron, rigging it to explode.",ckey=key_name(user))
message_admins("LOG: [user.name] ([user.ckey]) injected a light with phoron, rigging it to explode.")
- rigged = 1
+ rigged = TRUE
S.reagents.clear_reagents()
else
@@ -169,7 +169,8 @@
// now only shatter if the intent was harm
/obj/item/light/afterattack(atom/target, mob/user, proximity)
- if(!proximity) return
+ if(!proximity)
+ return
if(istype(target, /obj/machinery/light))
return
if(user.a_intent != I_HURT)
@@ -179,9 +180,10 @@
/obj/item/light/proc/shatter()
if(status == LIGHT_OK || status == LIGHT_BURNED)
- src.visible_message("[name] shatters.","You hear a small glass object shatter.")
+ visible_message(SPAN_WARNING("\The [src] shatters!"), SPAN_WARNING("You hear a small glass object shatter!"))
status = LIGHT_BROKEN
force = 5
- sharp = 1
- playsound(src.loc, 'sound/effects/glass_hit.ogg', 75, 1)
- update()
+ sharp = TRUE
+ playsound(get_turf(src), 'sound/effects/glass_hit.ogg', 75, TRUE)
+ new /obj/item/material/shard(get_turf(src))
+ update()
\ No newline at end of file
diff --git a/code/modules/power/lights/construction.dm b/code/modules/power/lights/construction.dm
index a6265b14f25..12ecb553493 100644
--- a/code/modules/power/lights/construction.dm
+++ b/code/modules/power/lights/construction.dm
@@ -4,7 +4,7 @@
desc = "A light fixture under construction."
icon = 'icons/obj/lighting.dmi'
icon_state = "tube-construct-stage1"
- anchored = 1
+ anchored = TRUE
layer = 5
var/stage = 1
var/fixture_type = "tube"
@@ -26,154 +26,132 @@
if(!..(user, 2))
return
- switch(src.stage)
+ switch(stage)
if(1)
- to_chat(user, "It's an empty frame.")
+ to_chat(user, SPAN_NOTICE("It's an empty frame."))
if(2)
- to_chat(user, "It's wired.")
+ to_chat(user, SPAN_NOTICE("It's wired."))
if(3)
- to_chat(user, "The casing is closed.")
+ to_chat(user, SPAN_NOTICE("The casing is closed."))
if (cell_connectors)
if (cell)
- to_chat(user, "You see [cell] inside the casing.")
+ to_chat(user, SPAN_NOTICE("You see [cell] inside the casing."))
else
- to_chat(user, "The casing has no power cell installed.")
+ to_chat(user, SPAN_NOTICE("The casing has no power cell installed."))
else
- to_chat(user, "This casing doesn't support a backup power cell.")
+ to_chat(user, SPAN_WARNING("This casing doesn't support a backup power cell."))
-/obj/machinery/light_construct/attackby(obj/item/W as obj, mob/user as mob)
+/obj/machinery/light_construct/attackby(obj/item/W, mob/living/user)
add_fingerprint(user)
- if (W.iswrench())
- if (src.stage == 1)
- playsound(src.loc, W.usesound, 75, 1)
- to_chat(usr, "You begin deconstructing [src].")
- if (!do_after(usr, 30, act_target = src))
+ if(W.iswrench())
+ switch(stage)
+ if(1)
+ playsound(get_turf(src), W.usesound, 75, TRUE)
+ to_chat(user, SPAN_NOTICE("You begin taking \the [src] apart..."))
+ if (!do_after(usr, 30, act_target = src))
+ return
+ new /obj/item/stack/material/steel(get_turf(src), sheets_refunded)
+ user.visible_message(SPAN_NOTICE("\The [user] takes \the [src] apart."), SPAN_WARNING("You take \the [src] apart."))
+ playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 75, TRUE)
+ if(cell)
+ cell.forceMove(get_turf(src))
+ cell = null
+ qdel(src)
+ if(2)
+ to_chat(user, SPAN_WARNING("You have to remove the wires first."))
+ return
+ if(3)
+ to_chat(user, SPAN_WARNING("You have to unscrew the case first."))
return
- new /obj/item/stack/material/steel(get_turf(src.loc), sheets_refunded)
- user.visible_message(
- "[user] deconstructs [src].",
- "You deconstruct [src]."
- )
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
- if (cell)
- cell.forceMove(get_turf(src))
- cell = null
- qdel(src)
- if (src.stage == 2)
- to_chat(usr, "You have to remove the wires first.")
- return
-
- if (src.stage == 3)
- to_chat(usr, "You have to unscrew the case first.")
- return
if(W.iswirecutter())
- if (src.stage != 2) return
- src.stage = 1
+ if(stage != 2)
+ return
+ stage = 1
switch(fixture_type)
- if ("tube")
- src.icon_state = "tube-construct-stage1"
+ if("tube")
+ icon_state = "tube-construct-stage1"
if("bulb")
- src.icon_state = "bulb-construct-stage1"
- new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
- user.visible_message(
- "[user] removes the wiring from [src].",
- "You remove the wiring from [src].",
- "You hear something being cut."
- )
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
+ icon_state = "bulb-construct-stage1"
+ new /obj/item/stack/cable_coil(get_turf(src), 1, "red")
+ user.visible_message(SPAN_NOTICE("\The [user] removes the wiring from \the [src]."), SPAN_NOTICE("You remove the wiring from [src]."), SPAN_WARNING("You hear something being cut."))
+ playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 100, TRUE)
return
if(W.iscoil())
- if (src.stage != 1) return
+ if(stage != 1)
+ return
var/obj/item/stack/cable_coil/coil = W
- if (coil.use(1))
+ if(coil.use(1))
switch(fixture_type)
- if ("tube")
- src.icon_state = "tube-construct-stage2"
+ if("tube")
+ icon_state = "tube-construct-stage2"
if("bulb")
- src.icon_state = "bulb-construct-stage2"
- src.stage = 2
- user.visible_message(
- "[user] adds wires to [src].",
- "You add wires to [src]."
- )
+ icon_state = "bulb-construct-stage2"
+ stage = 2
+ user.visible_message(SPAN_NOTICE("\The [user] adds wires to \the [src]."), SPAN_NOTICE("You add wires to \the [src]."))
return
if(W.isscrewdriver())
- if (stage == 2)
+ if(stage == 2)
switch(fixture_type)
if("tube")
icon_state = "tube_empty"
if("bulb")
icon_state = "bulb_empty"
stage = 3
- user.visible_message(
- "[user] closes [src]'s casing.",
- "You close [src]'s casing.",
- "You hear something being screwed in."
- )
- playsound(src.loc, W.usesound, 75, 1)
+ user.visible_message(SPAN_NOTICE("\The [user] closes \the [src]'s casing."), SPAN_NOTICE("You close \the [src]'s casing."), SPAN_WARNING("You hear something being screwed in."))
+ playsound(get_turf(src), W.usesound, 75, TRUE)
switch(fixture_type)
if("tube")
- newlight = new /obj/machinery/light/built(src.loc)
+ newlight = new /obj/machinery/light/built(get_turf(src))
if("bulb")
- newlight = new /obj/machinery/light/small/built(src.loc)
+ newlight = new /obj/machinery/light/small/built(get_turf(src))
newlight.dir = src.dir
- if (cell)
+ if(cell)
newlight.cell = cell
cell.forceMove(newlight)
cell = null
- src.transfer_fingerprints_to(newlight)
+ transfer_fingerprints_to(newlight)
qdel(src)
return
- if (istype(W, /obj/item/cell))
- if (!cell_connectors)
- to_chat(user, "[src] does not have power cell connectors.")
+ if(istype(W, /obj/item/cell))
+ if(!cell_connectors)
+ to_chat(user, SPAN_WARNING("\The [src] does not have power cell connectors."))
return
- if (!user.unEquip(W))
+ if(!user.unEquip(W))
return
- if (cell)
- user.visible_message(
- "[user] swaps [W] out for [src]'s cell.",
- "You swap out [src]'s cell out for [W]."
- )
+ if(cell)
+ user.visible_message(SPAN_NOTICE("\The [user] swaps \the [W] out for \the [src]'s cell."), SPAN_NOTICE("You swap out \the [src]'s cell out for \the [W]."))
+ user.drop_from_inventory(W, src)
cell.forceMove(get_turf(src))
user.put_in_hands(cell)
else
- user.visible_message(
- "[user] installs [W] in [src].",
- "You hook up [W] to [src]'s cell terminals."
- )
- playsound(src, 'sound/machines/click.ogg', 50, TRUE)
- W.forceMove(src)
- cell = W
- add_fingerprint(user)
- return
-
- if (W.iscrowbar())
- if (!cell_connectors)
- to_chat(user, "[src] does not have a power cell connector.")
- return
-
- if (!cell)
- to_chat(user, "[src] does not have a power cell installed.")
- return
-
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, TRUE)
- visible_message(
- "[user] removes [cell] from [src].",
- "You remove [cell] from [src]."
- )
- cell.forceMove(get_turf(src))
- cell = null
+ user.visible_message(SPAN_NOTICE("\The [user] installs \the [W] into \the [src]."), SPAN_NOTICE("You hook up \the [W] to \the [src]'s cell terminals."))
+ user.drop_from_inventory(W, src)
+ cell = W
+ playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
return
+ if(W.iscrowbar())
+ if(!cell_connectors)
+ to_chat(user, SPAN_WARNING("\The [src] does not have a power cell connector."))
+ return
+ if(!cell)
+ to_chat(user, SPAN_WARNING("\The [src] does not have a power cell installed."))
+ return
+
+ playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, TRUE)
+ visible_message(SPAN_NOTICE("\The [user] removes \the [cell] from the [src]."), SPAN_NOTICE("You remove \the [cell] from \the [src]."))
+ cell.forceMove(get_turf(src))
+ user.put_in_hands(cell)
+ cell = null
+ return
..()
/obj/machinery/light_construct/small
@@ -181,8 +159,8 @@
desc = "A small light fixture under construction."
icon = 'icons/obj/lighting.dmi'
icon_state = "bulb-construct-stage1"
- anchored = 1
+ anchored = TRUE
layer = 5
stage = 1
fixture_type = "bulb"
- sheets_refunded = 1
+ sheets_refunded = 1
\ No newline at end of file
diff --git a/code/modules/power/lights/fixtures.dm b/code/modules/power/lights/fixtures.dm
index 342d2d16c14..30a6665b05f 100644
--- a/code/modules/power/lights/fixtures.dm
+++ b/code/modules/power/lights/fixtures.dm
@@ -11,7 +11,7 @@
var/base_state = "tube" // base description and icon_state
icon_state = "tube_empty"
desc = "A lighting fixture."
- anchored = 1
+ anchored = TRUE
layer = 5 // They were appearing under mobs which is a little weird - Ostaf
use_power = 2
idle_power_usage = 2
@@ -238,7 +238,7 @@
if (!has_emergency_power(pwr))
return FALSE
if (cell.charge > 300) //it's meant to handle 120 W, ya doofus
- visible_message("[src] short-circuits!", "You hear glass breaking.")
+ visible_message(SPAN_WARNING("\The [src] short-circuits!"), SPAN_WARNING("You hear glass breaking."))
broken()
return FALSE
cell.use(pwr)
@@ -259,15 +259,19 @@
/obj/machinery/light/attack_generic(var/mob/user, var/damage)
if(!damage)
return
- if(status == LIGHT_EMPTY||status == LIGHT_BROKEN)
- to_chat(user, "That object is useless to you.")
+ if(status == LIGHT_EMPTY)
+ to_chat(user, SPAN_WARNING("\The [src] is useless to you."))
return
- if(!(status == LIGHT_OK||status == LIGHT_BURNED))
+ if(!(status == LIGHT_OK || status == LIGHT_BURNED))
return
- visible_message("[user] smashes the light!")
+ if(status == LIGHT_BROKEN)
+ user.visible_message(SPAN_WARNING("\The [user] completely shatters \the [src]!"), SPAN_WARNING("You completely shatter \the [src]!"))
+ shatter()
+ else
+ user.visible_message(SPAN_WARNING("\The [user] smashes \the [src]!"), SPAN_WARNING("You smash \the [src]!"))
+ broken()
user.do_attack_animation(src)
- broken()
- return 1
+ return TRUE
// examine verb
/obj/machinery/light/examine(mob/user)
@@ -287,7 +291,6 @@
// attack with item - insert light (if right type), otherwise try to break the light
/obj/machinery/light/attackby(obj/item/W, mob/user)
-
//Light replacer code
if(istype(W, /obj/item/device/lightreplacer))
var/obj/item/device/lightreplacer/LR = W
@@ -299,14 +302,14 @@
// attempt to insert light
if(istype(W, /obj/item/light))
if(status != LIGHT_EMPTY)
- to_chat(user, "There is a [fitting] already inserted.")
+ to_chat(user, SPAN_WARNING("There's already a [fitting] inserted."))
return
else
src.add_fingerprint(user)
var/obj/item/light/L = W
if(istype(L, light_type))
status = L.status
- to_chat(user, "You insert the [L.name].")
+ to_chat(user, SPAN_NOTICE("You insert \the [L]."))
switchcount = L.switchcount
rigged = L.rigged
brightness_range = L.brightness_range
@@ -329,43 +332,30 @@
explode()
else
- to_chat(user, "This type of light requires a [fitting].")
+ to_chat(user, SPAN_WARNING("This type of light requires a [fitting]."))
return
// attempt to break the light
//If xenos decide they want to smash a light bulb with a toolbox, who am I to stop them? /N
else if(status != LIGHT_BROKEN && status != LIGHT_EMPTY)
- if(prob(1+W.force * 5))
-
- to_chat(user, "You hit the light, and it smashes!")
- for(var/mob/M in viewers(src))
- if(M == user)
- continue
- M.show_message("[user.name] smashes the light!", 3, "You hear a tinkle of breaking glass", 2)
- if(!stat && (W.flags & CONDUCT))
- //if(!user.mutations & COLD_RESISTANCE)
- if (prob(12))
- electrocute_mob(user, get_area(src), src, 0.3)
- broken()
-
- else
- to_chat(user, "You hit the light!")
+ smash_check(W, user, "smashes", "smashes", TRUE)
+ else if(status == LIGHT_BROKEN)
+ smash_check(W, user, "completely shatters", "shatters completely", FALSE)
// attempt to stick weapon into light socket
else if(status == LIGHT_EMPTY)
if(W.isscrewdriver()) //If it's a screwdriver open it.
- playsound(src.loc, W.usesound, 75, 1)
- user.visible_message("[user.name] opens [src]'s casing.", \
- "You open [src]'s casing.", "You hear a noise.")
+ playsound(get_turf(src), W.usesound, 75, 1)
+ user.visible_message(SPAN_NOTICE("\The [user] opens \the [src]'s casing."), SPAN_NOTICE("You open \the [src]'s casing."), SPAN_NOTICE("You hear a noise."))
var/obj/machinery/light_construct/newlight = null
switch(fitting)
if("tube")
- newlight = new /obj/machinery/light_construct(src.loc)
+ newlight = new /obj/machinery/light_construct(get_turf(src))
newlight.icon_state = "tube-construct-stage2"
if("bulb")
- newlight = new /obj/machinery/light_construct/small(src.loc)
+ newlight = new /obj/machinery/light_construct/small(get_turf(src))
newlight.icon_state = "bulb-construct-stage2"
newlight.dir = src.dir
newlight.stage = 2
@@ -379,13 +369,25 @@
qdel(src)
return
- to_chat(user, "You stick \the [W] into the light socket!")
+ to_chat(user, SPAN_WARNING("You stick \the [W] into the light socket!"))
if(has_power() && (W.flags & CONDUCT))
spark(src, 3)
- //if(!user.mutations & COLD_RESISTANCE)
- if (prob(75))
+ if(prob(75))
electrocute_mob(user, get_area(src), src, rand(0.7,1.0))
+/obj/machinery/light/proc/smash_check(var/obj/O, var/mob/living/user, var/others_text, var/self_text, var/only_break)
+ if(prob(1 + O.force * 5))
+ user.visible_message(SPAN_WARNING("\The [user] [others_text] \the [src]!"), SPAN_WARNING("You hit \the [src], and it [self_text]!"), SPAN_WARNING("You hear a tinkle of breaking glass!"))
+ if(!stat && (O.flags & CONDUCT))
+ if(prob(12))
+ electrocute_mob(user, get_area(src), src, 0.3)
+ if(only_break)
+ broken()
+ else
+ shatter()
+ else
+ user.visible_message(SPAN_WARNING("\The [user] hits \the [src], but it doesn't break."), SPAN_WARNING("You hit \the [src], but it doesn't break."), SPAN_WARNING("You hear something hitting against glass."))
+
// returns whether this light has power
// true if area has power
@@ -432,19 +434,20 @@
add_fingerprint(user)
if(status == LIGHT_EMPTY)
- to_chat(user, "There is no [fitting] in this light.")
+ to_chat(user, SPAN_WARNING("There is no [fitting] in \the [src]."))
return
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
- if(H.species.can_shred(H))
- H.visible_message(
- "[user] smashes [src]!",
- "You smash [src]!",
- "You hear the tinkle of breaking glass."
- )
- broken()
- return
+ if(H.a_intent == I_HURT && H.species.can_shred(H))
+ if(status != LIGHT_BROKEN || status != LIGHT_EMPTY)
+ H.visible_message(SPAN_WARNING("\The [user] smashes \the [src]!"), SPAN_WARNING("You smash \the [src]!"), SPAN_WARNING("You hear the tinkle of breaking glass."))
+ broken()
+ return
+ else if(status == LIGHT_BROKEN)
+ H.visible_message(SPAN_WARNING("\The [user] completely shatters \the [src]!"), SPAN_WARNING("You shatter \the [src] completely!"), SPAN_WARNING("You hear the tinkle of breaking glass."))
+ shatter()
+ return
// make it burn hands if not wearing fire-insulated gloves
if(!stat)
@@ -462,12 +465,12 @@
prot = 1
if(prot || (COLD_RESISTANCE in user.mutations))
- to_chat(user, "You remove the light [fitting]")
+ to_chat(user, SPAN_NOTICE("You remove the light [fitting]."))
else
- to_chat(user, "You try to remove the light [fitting], but it's too hot and you don't want to burn your hand.")
+ to_chat(user, SPAN_WARNING("You try to remove the light [fitting], but it's too hot and you don't want to burn your hand."))
return // if burned, don't remove the light
else
- to_chat(user, "You remove the light [fitting].")
+ to_chat(user, SPAN_NOTICE("You remove the light [fitting]."))
// create a light tube/bulb item and put it in the user's hand
if(inserted_light)
@@ -543,6 +546,15 @@
if (!skip_sound_and_sparks)
CHECK_TICK // For lights-out events.
+/obj/machinery/light/proc/shatter()
+ if(status == LIGHT_EMPTY)
+ return
+ status = LIGHT_EMPTY
+ stat |= BROKEN
+ update()
+ playsound(get_turf(src), 'sound/effects/glass_hit.ogg', 75, TRUE)
+ new /obj/item/material/shard(get_turf(src))
+
/obj/machinery/light/proc/fix()
if(status == LIGHT_OK)
return
@@ -559,7 +571,7 @@
return
if(2.0)
if (prob(75))
- broken()
+ shatter()
if(3.0)
if (prob(50))
broken()
diff --git a/html/changelogs/geeves-no_flare.yml b/html/changelogs/geeves-no_flare.yml
new file mode 100644
index 00000000000..64926d9fe8f
--- /dev/null
+++ b/html/changelogs/geeves-no_flare.yml
@@ -0,0 +1,15 @@
+author: Geeves
+
+delete-after: True
+
+changes:
+ - tweak: "Emergency flares have been replaced by red glowsticks."
+ - tweak: "Flares are now slightly less bright and last slightly less longer."
+ - tweak: "Glowsticks are now more slightly more bright."
+ - bugfix: "Glowsticks now only show one message after being activated."
+ - rscadd: "Flashlights now face the direction you're facing when dropped. They also face a random direction after being thrown."
+ - tweak: "Desk lamps are slightly less bright."
+ - tweak: "Candles now last twice as long."
+ - tweak: "Lanterns are now less bright and only shed light in 120 degrees."
+ - rscdel: "Diona no longer spawn with flares, as they spawn with the glowstick in their emergency box. And can make their own light."
+ - rscadd: "You can now hit a light fixture with a broken light again to completely shatter the light bulb."
\ No newline at end of file
diff --git a/maps/aurora/aurora-1_centcomm.dmm b/maps/aurora/aurora-1_centcomm.dmm
index 4f812972e26..b83b149bf06 100644
--- a/maps/aurora/aurora-1_centcomm.dmm
+++ b/maps/aurora/aurora-1_centcomm.dmm
@@ -19159,8 +19159,8 @@
pixel_y = 2
},
/obj/item/storage/briefcase/inflatable,
-/obj/item/device/flashlight/flare,
-/obj/item/device/flashlight/flare,
+/obj/item/device/flashlight/flare/glowstick/red,
+/obj/item/device/flashlight/flare/glowstick/red,
/obj/machinery/light{
dir = 4;
icon_state = "tube1"
@@ -20502,40 +20502,40 @@
/area/centcom/legion)
"eQO" = (
/obj/structure/table/rack,
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = -2
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = -2
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = -2
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = -2
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 3
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 3
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 3
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 3
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 8
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 8
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 8
},
-/obj/item/device/flashlight/flare{
+/obj/item/device/flashlight/flare/glowstick/red{
pixel_y = 8
},
/turf/unsimulated/floor{
diff --git a/maps/aurora/aurora-6_surface.dmm b/maps/aurora/aurora-6_surface.dmm
index dfb07c42cbf..ffa65f24b79 100644
--- a/maps/aurora/aurora-6_surface.dmm
+++ b/maps/aurora/aurora-6_surface.dmm
@@ -11912,8 +11912,8 @@
pixel_y = 2
},
/obj/item/storage/briefcase/inflatable,
-/obj/item/device/flashlight/flare,
-/obj/item/device/flashlight/flare,
+/obj/item/device/flashlight/flare/glowstick/red,
+/obj/item/device/flashlight/flare/glowstick/red,
/obj/effect/floor_decal/industrial/outline/yellow,
/turf/simulated/floor/tiled,
/area/shuttle/research/station)
diff --git a/maps/exodus/exodus-1_station.dmm b/maps/exodus/exodus-1_station.dmm
index 80ca1fb81f6..4fddf73d9d4 100644
--- a/maps/exodus/exodus-1_station.dmm
+++ b/maps/exodus/exodus-1_station.dmm
@@ -15372,7 +15372,7 @@
/obj/machinery/light{
dir = 1
},
-/obj/item/device/flashlight/flare,
+/obj/item/device/flashlight/flare/glowstick/red,
/obj/effect/floor_decal/corner/blue/full{
dir = 8
},