Skip to content

Commit

Permalink
TGS Test Merge (#7582)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Nov 18, 2024
2 parents 4e4d1d8 + 54e4c62 commit b36811e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 7 deletions.
6 changes: 3 additions & 3 deletions code/game/objects/effects/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
/// Factor of duration between acid progression
var/acid_delay = 1
/// How much fuel the acid drains from the flare every acid tick
var/flare_damage = 500
var/flare_damage = 600
var/barricade_damage = 40
var/in_weather = FALSE

Expand All @@ -311,15 +311,15 @@
name = "weak acid"
acid_delay = 2.5 //250% delay (40% speed)
barricade_damage = 20
flare_damage = 150
flare_damage = 180
icon_state = "acid_weak"

//Superacid
/obj/effect/xenomorph/acid/strong
name = "strong acid"
acid_delay = 0.4 //40% delay (250% speed)
barricade_damage = 100
flare_damage = 1875
flare_damage = 2250
icon_state = "acid_strong"

/obj/effect/xenomorph/acid/Initialize(mapload, atom/target)
Expand Down
52 changes: 48 additions & 4 deletions code/game/objects/items/devices/flashlight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
desc = "A red USCM issued flare. There are instructions on the side, it reads 'pull cord, make light'."
w_class = SIZE_SMALL
light_power = 2
light_range = 5
light_range = 7
icon_state = "flare"
item_state = "flare"
actions = list() //just pull it manually, neckbeard.
Expand All @@ -327,7 +327,7 @@

/obj/item/device/flashlight/flare/Initialize()
. = ..()
fuel = rand(9.5 MINUTES, 10.5 MINUTES)
fuel = 15 MINUTES
set_light_color(flame_tint)

/obj/item/device/flashlight/flare/update_icon()
Expand Down Expand Up @@ -362,9 +362,28 @@

/obj/item/device/flashlight/flare/process(delta_time)
fuel -= fuel_rate * delta_time
flare_burn_down()
if(fuel <= 0 || !on)
burn_out()

/obj/item/device/flashlight/flare/proc/flare_burn_down() //Controls the way in which flares slowly die out. Needs to be overriden by children, or they will be forced to use this light behavior.
switch(fuel) //The code belows controls the timing on a flares burn out, and the corresponding reduction in effective range.
if(14.25 MINUTES to 15 MINUTES)
set_light_range(7)
if(13.5 MINUTES to 14.24 MINUTES)
set_light_range(6)
if(4.0 MINUTES to 13.49 MINUTES)
set_light_range(5)
if(3.0 MINUTES to 3.99 MINUTES)
set_light_range(4)
if(2.0 MINUTES to 2.99 MINUTES)
set_light_range(3)
if(0.5 MINUTES to 1.99 MINUTES)
set_light_range(2)
if(0 MINUTES to 0.49 MINUTES)
set_light_range(1)
set_light_power(0.5) // A power of 2 results in no light at all, while .5 results in a small light.

// Causes flares to stop with a rotation offset for visual purposes
/obj/item/device/flashlight/flare/animation_spin(speed = 5, loop_amount = -1, clockwise = TRUE, sections = 3, angular_offset = 0, pixel_fuzz = 0)
pixel_fuzz = 16
Expand Down Expand Up @@ -450,10 +469,14 @@
icon_state = "" //No sprite
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
show_flame = FALSE
light_range = 7

/obj/item/device/flashlight/flare/on/illumination/Initialize()
. = ..()
fuel = rand(4.5 MINUTES, 5.5 MINUTES) // Half the duration of a flare, but justified since it's invincible
fuel = rand(5.0 MINUTES, 6.0 MINUTES) // Approximately half the effective duration of a flare, but justified since it's invincible

/obj/item/device/flashlight/flare/on/illumination/flare_burn_down() // Empty proc to override parent.
return

/obj/item/device/flashlight/flare/on/illumination/update_icon()
return
Expand All @@ -472,12 +495,29 @@
anchored = TRUE//can't be picked up
ammo_datum = /datum/ammo/flare/starshell
show_flame = FALSE
light_range = 6

/obj/item/device/flashlight/flare/on/starshell_ash/Initialize(mapload, ...)
if(mapload)
return INITIALIZE_HINT_QDEL
. = ..()
fuel = rand(4.5 MINUTES, 5.5 MINUTES)
fuel = rand(6.0 MINUTES, 6.5 MINUTES)

/obj/item/device/flashlight/flare/on/starshell_ash/flare_burn_down() // Starshell's own burn_down curve, overrides parent flare.
switch(fuel)
if(6.0 MINUTES to 6.5 MINUTES)
set_light_range(6)
if(2.5 MINUTES to 5.99 MINUTES)
set_light_range(5)
if(2.0 MINUTES to 2.49 MINUTES)
set_light_range(4)
if(1.5 MINUTES to 1.99 MINUTES)
set_light_range(3)
if(1.0 MINUTES to 1.49 MINUTES)
set_light_range(2)
if(0 MINUTES to 0.99 MINUTES)
set_light_range(1)
set_light_power(0.5)

/obj/item/device/flashlight/flare/on/illumination/chemical
name = "chemical light"
Expand Down Expand Up @@ -529,6 +569,7 @@
item_state = "cas_flare"
layer = ABOVE_FLY_LAYER
ammo_datum = /datum/ammo/flare/signal
light_range = 5
var/faction = ""
var/datum/cas_signal/signal
var/activate_message = TRUE
Expand All @@ -539,6 +580,9 @@
. = ..()
fuel = rand(160 SECONDS, 200 SECONDS)

/obj/item/device/flashlight/flare/signal/flare_burn_down() // Empty proc to override parent.
return

/obj/item/device/flashlight/flare/signal/attack_self(mob/living/carbon/human/user)
if(!istype(user))
return
Expand Down

0 comments on commit b36811e

Please sign in to comment.