mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-13 11:01:40 +00:00
* MILLA phase 2 * Lint. * Build Rust library * Assorted bugfixes and tweaks * Simplify fire mechanics and make hotspot sending to DM more reliable. * Assorted tweaks, fixed an issue in the core engine and removed the softcap it made necesary. * SM fixes, slower plasmafire, less overpowered pyro anomalies, and air alarm improvements. * Review fixes. * Build Rust library * Unbalanced icon. * Rebalance immovable rods. * Unbalanced has alerts, can fight airflow (but get slowed) * Build Rust library * Stronger space cooling, slower temperature flow, faster burns, burnt floors, and a hotspot display fix. * Build Rust library * Tweaks to avoid merge conflict * Oops. * Build Rust library * Rebalance wind. * Rebalance temperature flow and space cooling. * Fix gas flamethrower. * Build Rust library * Make air push slowdown directional, so you don't get slowed while moving with the air. * Variable name cleanup. * Reduce the speed of wind pushes. * Prevent wind pushes from breaking your pull. * Prevent swaps during wind push. * Made supermatter crytals reliably run last in atmos machinery. * Sped up plasmafire burning, but dropped the minimum burn amount. * Rebalanced SM heat output. * Rebalanced pyro anomaly. * Build Rust library * Lint * Build Rust library * Uncap fuel burnt readout. * Added Custom air alarm mode, dropped Refill cap to ONE_ATMOSPHERE. * Updated air alarm modes to use pressure settings instead of ONE_ATMOSPHERE * Added a list of areas not in Filtering to atmos alert computer. * Increase pressure gradient and vent output, especially at low distro pressure. * Changed Immovable Rod from Moderate to Major. * Lint * Build Rust library * More lint! * Build Rust library * Magboots, scaled slowdown, and nukie borg immunity * Wind image * Wind v2 * Wind v3 * pngcrush * pngcrush again * Moved hotspot removal into SSair, add wind effect. * Lint * Build Rust library * Fix hotspots. * Hotspot visual based on gas burnt * Build Rust library * Scaled wind to gas amount, stopped first wind push while moving. * Made Rust panic logging safer. * Made MILLA full tick and sleep timers more honest. * Pressure overlay, ghost mode, atmos goggles. * Build Rust library * Lint * Build Rust library * More lint-y stuff. * Build Rust library * Repair pressure overlay if it loses its loc. * Bind pressure overlays to their tile better. * Build Rust library * Make the pressure overlay work on z=1 and not proliferate effects. * Don't block the supply shuttle. * Don't fine for special effects. * Maybe don't fine for ghosts, either. * Build Rust library * Make pressure overlay play nice with shuttles. * Build Rust library * Pressure scanning for borgs. * Build Rust library * Lint * Build Rust library * Made explosions not generate so much wind. * Removed an old and non-functional proc. * Clientless mobs can get pushed again. * Build Rust library * cargo fmt * Build Rust library * Don't divide by zero. * Plasmafire generator for the Shadow * Update shadow to use plasmafire generators * Fix shadow's plasmafire generators going out on depart. * Prevent heat2color from runtiming at absolute zero. * Better nanofrost * Build Rust library * Singularity immunity * Build Rust library * Add back meson mode to atmospheric scanner goggles, so they don't stare deeply into the SM * Build Rust library * Dump panic outputs into data/ instead. * Build Rust library * Apply suggestions from code review Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> * Saner handling of MILLA crash. * Build Rust library --------- Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
161 lines
3.8 KiB
Plaintext
161 lines
3.8 KiB
Plaintext
#define TALL_CANDLE 1
|
|
#define MID_CANDLE 2
|
|
#define SHORT_CANDLE 3
|
|
|
|
/obj/item/candle
|
|
name = "red candle"
|
|
desc = "In Greek myth, Prometheus stole fire from the Gods and gave it to humankind. The jewelry he kept for himself."
|
|
icon = 'icons/obj/candle.dmi'
|
|
icon_state = "candle1"
|
|
item_state = "candle1"
|
|
w_class = WEIGHT_CLASS_TINY
|
|
var/wax = 200
|
|
/// Index for the icon state
|
|
var/wax_index = TALL_CANDLE
|
|
var/lit = FALSE
|
|
var/infinite = FALSE
|
|
var/start_lit = FALSE
|
|
var/flickering = FALSE
|
|
light_color = "#E09D37"
|
|
|
|
/obj/item/candle/New()
|
|
..()
|
|
if(start_lit)
|
|
// No visible message
|
|
light(show_message = 0)
|
|
|
|
/obj/item/candle/Destroy()
|
|
STOP_PROCESSING(SSobj, src)
|
|
return ..()
|
|
|
|
/obj/item/candle/update_icon_state()
|
|
if(flickering)
|
|
icon_state = "candle[wax_index]_flicker"
|
|
else
|
|
icon_state = "candle[wax_index][lit ? "_lit" : ""]"
|
|
|
|
/obj/item/candle/can_enter_storage(obj/item/storage/S, mob/user)
|
|
if(lit)
|
|
to_chat(user, "<span class='warning'>[S] can't hold [src] while it's lit!</span>")
|
|
return FALSE
|
|
else
|
|
return TRUE
|
|
|
|
/obj/item/candle/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
|
if(W.get_heat())
|
|
light("<span class='notice'>[user] lights [src] with [W].</span>")
|
|
return
|
|
return ..()
|
|
|
|
/obj/item/candle/welder_act(mob/user, obj/item/I)
|
|
. = TRUE
|
|
if(I.tool_use_check(user, 0)) //Don't need to flash eyes because you are a badass
|
|
light("<span class='notice'>[user] casually lights [src] with [I], what a badass.</span>")
|
|
|
|
/obj/item/candle/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
|
if(!lit)
|
|
light() //honk
|
|
return ..()
|
|
|
|
/obj/item/candle/proc/light(show_message)
|
|
if(!lit)
|
|
lit = TRUE
|
|
if(show_message)
|
|
usr.visible_message(show_message)
|
|
set_light(CANDLE_LUM)
|
|
START_PROCESSING(SSobj, src)
|
|
update_icon(UPDATE_ICON_STATE)
|
|
|
|
/obj/item/candle/proc/update_wax_index()
|
|
var/new_wax_index
|
|
if(wax > 150)
|
|
new_wax_index = TALL_CANDLE
|
|
else if(wax > 80)
|
|
new_wax_index = MID_CANDLE
|
|
else
|
|
new_wax_index = SHORT_CANDLE
|
|
if(wax_index != new_wax_index)
|
|
wax_index = new_wax_index
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/item/candle/proc/start_flickering()
|
|
flickering = TRUE
|
|
update_icon(UPDATE_ICON_STATE)
|
|
addtimer(CALLBACK(src, PROC_REF(stop_flickering)), 4 SECONDS, TIMER_UNIQUE)
|
|
|
|
/obj/item/candle/proc/stop_flickering()
|
|
flickering = FALSE
|
|
update_icon(UPDATE_ICON_STATE)
|
|
|
|
/obj/item/candle/process()
|
|
if(!lit)
|
|
return
|
|
if(!infinite)
|
|
wax--
|
|
if(wax_index != SHORT_CANDLE) // It's not at its shortest
|
|
if(update_wax_index())
|
|
update_icon(UPDATE_ICON_STATE)
|
|
if(!wax)
|
|
new/obj/item/trash/candle(src.loc)
|
|
if(ismob(src.loc))
|
|
var/mob/M = src.loc
|
|
M.unEquip(src, 1) //src is being deleted anyway
|
|
qdel(src)
|
|
if(isturf(loc)) //start a fire if possible
|
|
var/turf/T = loc
|
|
T.hotspot_expose(700, 1)
|
|
|
|
/obj/item/candle/proc/unlight()
|
|
if(lit)
|
|
lit = FALSE
|
|
update_icon(UPDATE_ICON_STATE)
|
|
set_light(0)
|
|
|
|
|
|
/obj/item/candle/attack_self__legacy__attackchain(mob/user)
|
|
if(lit)
|
|
user.visible_message("<span class='notice'>[user] snuffs out [src].</span>")
|
|
unlight()
|
|
|
|
/obj/item/candle/eternal
|
|
desc = "A candle. This one seems to have an odd quality about the wax."
|
|
infinite = TRUE
|
|
|
|
/obj/item/candle/get_spooked()
|
|
if(lit)
|
|
start_flickering()
|
|
playsound(src, 'sound/effects/candle_flicker.ogg', 15, 1)
|
|
return TRUE
|
|
|
|
return FALSE
|
|
|
|
/obj/item/candle/eternal/wizard
|
|
desc = "A candle. It smells like magic, so that would explain why it burns brighter."
|
|
start_lit = TRUE
|
|
|
|
/obj/item/candle/eternal/wizard/attack_self__legacy__attackchain(mob/user)
|
|
return
|
|
|
|
/obj/item/candle/eternal/wizard/process()
|
|
return
|
|
|
|
/obj/item/candle/eternal/wizard/light(show_message)
|
|
. = ..()
|
|
if(lit)
|
|
set_light(CANDLE_LUM * 2)
|
|
|
|
|
|
/obj/item/candle/extinguish_light(force)
|
|
if(!force)
|
|
return
|
|
infinite = FALSE
|
|
wax = 1 // next process will burn it out
|
|
|
|
/obj/item/candle/get_heat()
|
|
return lit * 1000
|
|
|
|
#undef TALL_CANDLE
|
|
#undef MID_CANDLE
|
|
#undef SHORT_CANDLE
|