mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 05:31:53 +00:00
Adds several new map/event oriented objects (#5757)
* Adds some helpful effects to enhance PoI construction. * Adds several features for mappers. * Test map please go
This commit is contained in:
@@ -387,3 +387,8 @@
|
||||
if(isSynthetic())
|
||||
return 0
|
||||
return !(species.flags & NO_PAIN)
|
||||
|
||||
/mob/living/carbon/needs_to_breathe()
|
||||
if(does_not_breathe)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -529,7 +529,7 @@ default behaviour is:
|
||||
|
||||
// and one for electricity because why not
|
||||
/mob/living/proc/inflict_shock_damage(amount)
|
||||
electrocute_act(amount, null, 1 - get_shock_protection())
|
||||
electrocute_act(amount, null, 1 - get_shock_protection(), pick(BP_HEAD, BP_TORSO, BP_GROIN))
|
||||
|
||||
// also one for water (most things resist it entirely, except for slimes)
|
||||
/mob/living/proc/inflict_water_damage(amount)
|
||||
@@ -1270,4 +1270,7 @@ default behaviour is:
|
||||
|
||||
|
||||
/mob/living/proc/dirties_floor() // If we ever decide to add fancy conditionals for making dirty floors (floating, etc), here's the proc.
|
||||
return makes_dirt
|
||||
return makes_dirt
|
||||
|
||||
/mob/living/proc/needs_to_breathe()
|
||||
return !isSynthetic()
|
||||
@@ -176,6 +176,11 @@
|
||||
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
|
||||
var/auto_flicker = FALSE // If true, will constantly flicker, so long as someone is around to see it (otherwise its a waste of CPU).
|
||||
|
||||
/obj/machinery/light/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
// the smaller bulb light fixture
|
||||
|
||||
/obj/machinery/light/small
|
||||
@@ -187,6 +192,9 @@
|
||||
desc = "A small lighting fixture."
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
|
||||
/obj/machinery/light/small/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
/obj/machinery/light/flamp
|
||||
icon_state = "flamp1"
|
||||
base_state = "flamp"
|
||||
@@ -199,10 +207,18 @@
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
var/lamp_shade = 1
|
||||
|
||||
/obj/machinery/light/flamp/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
|
||||
/obj/machinery/light/small/emergency
|
||||
brightness_range = 4
|
||||
brightness_color = "#da0205"
|
||||
|
||||
/obj/machinery/light/small/emergency/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
|
||||
/obj/machinery/light/spot
|
||||
name = "spotlight"
|
||||
fitting = "large tube"
|
||||
@@ -210,6 +226,10 @@
|
||||
brightness_range = 12
|
||||
brightness_power = 0.9
|
||||
|
||||
/obj/machinery/light/spot/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
|
||||
/obj/machinery/light/built/New()
|
||||
status = LIGHT_EMPTY
|
||||
update(0)
|
||||
@@ -292,7 +312,8 @@
|
||||
update_icon()
|
||||
if(on)
|
||||
if(light_range != brightness_range || light_power != brightness_power || light_color != brightness_color)
|
||||
switchcount++
|
||||
if(!auto_flicker)
|
||||
switchcount++
|
||||
if(rigged)
|
||||
if(status == LIGHT_OK && trigger)
|
||||
|
||||
@@ -675,6 +696,13 @@
|
||||
if(on)
|
||||
use_power(light_range * LIGHTING_POWER_FACTOR, LIGHT)
|
||||
|
||||
if(auto_flicker && !flickering)
|
||||
if(check_for_player_proximity(src, radius = 12, ignore_ghosts = FALSE, ignore_afk = TRUE))
|
||||
seton(TRUE) // Lights must be on to flicker.
|
||||
flicker(5)
|
||||
else
|
||||
seton(FALSE) // Otherwise keep it dark and spooky for when someone shows up.
|
||||
|
||||
|
||||
// called when area power state changes
|
||||
/obj/machinery/light/power_change()
|
||||
|
||||
Reference in New Issue
Block a user