Skip to content

Commit

Permalink
[MIRROR] Buffs to Helmet Lights and Floodlights
Browse files Browse the repository at this point in the history
  • Loading branch information
Jebediahtechnic authored and SierraHelper committed Jan 6, 2025
1 parent 5c05f1a commit 682a7dd
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 8 deletions.
10 changes: 5 additions & 5 deletions code/game/machinery/floodlight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

//better laser, increased brightness & power consumption
var/l_power = 2.5 //brightness of light when on, can be negative
var/l_range = 7 //outer range of light when on, can be negative
var/l_range = 8 //outer range of light when on, can be negative

/obj/machinery/floodlight/on_update_icon()
icon_state = "flood[panel_open ? "o" : ""][panel_open && get_cell() ? "b" : ""]0[use_power == POWER_USE_ACTIVE]"
Expand All @@ -33,17 +33,17 @@

// If the cell is almost empty rarely "flicker" the light. Aesthetic only.
if(prob(30))
set_light(l_range, l_power / 2, angle = LIGHT_WIDE)
set_light(l_range, l_power / 2, angle = LIGHT_VERY_WIDE)
spawn(20)
if(use_power)
set_light(l_range, l_power, angle = LIGHT_WIDE)
set_light(l_range, l_power, angle = LIGHT_VERY_WIDE)

// Returns 0 on failure and 1 on success
/obj/machinery/floodlight/proc/turn_on(loud = 0)
if(!is_powered())
return 0

set_light(l_range, l_power / 2, angle = LIGHT_WIDE)
set_light(l_range, l_power / 2, angle = LIGHT_VERY_WIDE)
update_use_power(POWER_USE_ACTIVE)
use_power_oneoff(active_power_usage)//so we drain cell if they keep trying to use it
update_icon()
Expand Down Expand Up @@ -80,4 +80,4 @@
l_range = light_mod*1.5 + initial(l_range)
change_power_consumption(initial(active_power_usage) * light_mod , POWER_USE_ACTIVE)
if(use_power)
set_light(l_range, l_power, angle = LIGHT_WIDE)
set_light(l_range, l_power, angle = LIGHT_VERY_WIDE)
3 changes: 2 additions & 1 deletion code/modules/clothing/_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ BLIND // can't see anything
var/image/light_overlay_image
var/light_overlay = "helmet_light"
var/light_applied
var/head_light_range = 4
var/brightness_on
var/on = 0

Expand Down Expand Up @@ -553,7 +554,7 @@ BLIND // can't see anything

/obj/item/clothing/head/proc/update_flashlight(mob/user = null)
if(on && !light_applied)
set_light(3, brightness_on, angle = LIGHT_WIDE)
set_light(head_light_range, brightness_on, angle = LIGHT_WIDE)
light_applied = 1
else if(!on && light_applied)
set_light(0)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/clothing/head/hardhat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight."
icon_state = "hardhat0_yellow"
action_button_name = "Toggle Headlamp"
brightness_on = 0.5 //luminosity when on
head_light_range = 5 //light range when on
brightness_on = 0.8 //luminosity when on
light_overlay = "hardhat_light"
w_class = ITEM_SIZE_NORMAL
item_flags = null
Expand Down
3 changes: 3 additions & 0 deletions code/modules/clothing/spacesuits/rig/suits/station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@

/obj/item/clothing/head/helmet/space/rig/industrial
light_overlay = "helmet_light_wide"
head_light_range = 5
camera = /obj/machinery/camera/network/helmet
species_restricted = list(SPECIES_HUMAN,SPECIES_SKRELL,SPECIES_UNATHI,SPECIES_IPC)

Expand Down Expand Up @@ -131,6 +132,7 @@

/obj/item/clothing/head/helmet/space/rig/eva
light_overlay = "helmet_light_alt"
head_light_range = 5
camera = /obj/machinery/camera/network/helmet
species_restricted = list(SPECIES_HUMAN,SPECIES_SKRELL,SPECIES_UNATHI,SPECIES_IPC)
sprite_sheets = list(
Expand Down Expand Up @@ -220,6 +222,7 @@

/obj/item/clothing/head/helmet/space/rig/ce
light_overlay = "helmet_light_alt"
head_light_range = 5
camera = /obj/machinery/camera/network/helmet
species_restricted = list(SPECIES_HUMAN,SPECIES_SKRELL,SPECIES_UNATHI,SPECIES_IPC)
sprite_sheets = list(
Expand Down
3 changes: 3 additions & 0 deletions code/modules/clothing/spacesuits/void/station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
rad = ARMOR_RAD_MINOR
)
light_overlay = "helmet_light_dual_alt"
head_light_range = 5
max_pressure_protection = ENG_VOIDSUIT_MAX_PRESSURE

/obj/item/clothing/suit/space/void/mining
Expand Down Expand Up @@ -195,6 +196,7 @@
)
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
light_overlay = "helmet_light_dual"
head_light_range = 5
max_pressure_protection = FIRESUIT_MAX_PRESSURE

/obj/item/clothing/suit/space/void/atmos
Expand Down Expand Up @@ -239,6 +241,7 @@
rad = ARMOR_RAD_SHIELDED
)
light_overlay = "helmet_light_dual"
head_light_range = 5

/obj/item/clothing/suit/space/void/engineering/alt
name = "reinforced engineering voidsuit"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mechs/equipment/utility.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@

var/on = 0
var/l_power = 2
var/l_range = 6
var/l_range = 7
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)

/obj/item/mech_equipment/light/installed(mob/living/exosuit/_owner)
Expand Down
1 change: 1 addition & 0 deletions code/modules/skrell/skrell_rigs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
name = "skrellian recon hardsuit helmet"
desc = "A powerful recon hardsuit with integrated power supply and atmosphere. It's impressive design perfectly tailors to the user's body."
light_overlay = "helmet_light_dual"
head_light_range = 5
species_restricted = list(SPECIES_SKRELL)
sprite_sheets = list(
SPECIES_SKRELL = 'icons/mob/species/skrell/onmob_head_rig_skrell.dmi'
Expand Down
3 changes: 3 additions & 0 deletions maps/torch/items/clothing/solgov-head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@

/obj/item/clothing/head/helmet/space/void/engineering/alt/sol
light_overlay = "helmet_light_alt"
head_light_range = 5
icon = 'maps/torch/icons/obj/obj_head_solgov.dmi'
item_icons = list(slot_head_str = 'maps/torch/icons/mob/onmob_head_solgov.dmi')
sprite_sheets = list(
Expand All @@ -386,6 +387,7 @@

/obj/item/clothing/head/helmet/space/void/atmos/alt/sol
light_overlay = "helmet_light_alt"
head_light_range = 5
icon = 'maps/torch/icons/obj/obj_head_solgov.dmi'
item_icons = list(slot_head_str = 'maps/torch/icons/mob/onmob_head_solgov.dmi')
sprite_sheets = list(
Expand Down Expand Up @@ -465,6 +467,7 @@
rad = ARMOR_RAD_RESISTANT
)
light_overlay = "helmet_light_dual_alt"
head_light_range = 5
tinted = FALSE
valid_accessory_slots = null
restricted_accessory_slots = null
1 change: 1 addition & 0 deletions maps/torch/items/rigs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@
camera = /obj/machinery/camera/network/helmet
icon_state = "command_exp_rig"
light_overlay = "helmet_light_wide"
head_light_range = 5
brightness_on = 0.8

/obj/item/clothing/suit/space/rig/command/exploration
Expand Down

0 comments on commit 682a7dd

Please sign in to comment.