mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Adds disco light floor (#20109)
* Adds disco light floor * Fixes tiles not stacking * Fixes linter issue * Update code/game/turfs/simulated/floor/light_floor.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Update code/game/turfs/simulated/floor/light_floor.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Update code/__HELPERS/lists.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Replaces shitcode with simple solutions * Update code/game/turfs/simulated/floor/light_floor.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * pick excluding Co-authored-by: Farie82 <farie82@users.noreply.github.com> * pick instead of rand Co-authored-by: Farie82 <farie82@users.noreply.github.com> * Simplifies the color change process * forgor setting current_color Co-authored-by: Farie82 <farie82@users.noreply.github.com> * proper autodoc format Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
co-authored by
AffectedArc07
Ryan
Farie82
parent
cc1de516ad
commit
579fd817c1
@@ -6249,6 +6249,7 @@
|
||||
/obj/machinery/light/spot,
|
||||
/obj/effect/spawner/lootdrop/trade_sol/serv,
|
||||
/obj/structure/closet,
|
||||
/obj/item/stack/tile/disco_light/thirty,
|
||||
/turf/simulated/floor/mineral/titanium,
|
||||
/area/shuttle/trade/sol)
|
||||
"wb" = (
|
||||
|
||||
@@ -855,3 +855,7 @@
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
// Pick something else from a list than we last picked
|
||||
/proc/pick_excluding(list/l, exclude)
|
||||
return pick(l - exclude)
|
||||
|
||||
@@ -260,3 +260,14 @@
|
||||
|
||||
/obj/item/stack/tile/arcade_carpet/loaded
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/disco_light
|
||||
name = "disco light tiles"
|
||||
singular_name = "disco light tile"
|
||||
desc = "A sheet of disco light tile."
|
||||
icon_state = "tile_disco"
|
||||
turf_type = /turf/simulated/floor/light/disco
|
||||
merge_type = /obj/item/stack/tile/disco_light
|
||||
|
||||
/obj/item/stack/tile/disco_light/thirty
|
||||
amount = 30
|
||||
|
||||
@@ -111,3 +111,42 @@
|
||||
var/color_save = color
|
||||
..()
|
||||
color = color_save
|
||||
|
||||
// These tiles change color every now and then
|
||||
/turf/simulated/floor/light/disco
|
||||
floor_tile = /obj/item/stack/tile/disco_light
|
||||
/// Cannot change its color with a multitool
|
||||
can_modify_colour = FALSE
|
||||
/// The tile can change into these colors
|
||||
var/list/available_colors = list("#d41e3c", "#ed7b39", "#fff540", "#77b02a", "#488bd4", "#b0fff1", "#94007a", "#ff417d")
|
||||
/// This is our current color, don't pick it again
|
||||
var/current_color
|
||||
|
||||
// We pick a random color when we are spawned
|
||||
/turf/simulated/floor/light/disco/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
// The animation happens in this proc
|
||||
/turf/simulated/floor/light/disco/proc/change_color()
|
||||
current_color = pick_excluding(available_colors, current_color)
|
||||
animate_fade_to_color_fill(src, current_color, 2)
|
||||
|
||||
// We change colors every now and then
|
||||
/turf/simulated/floor/light/disco/process()
|
||||
if(on)
|
||||
change_color()
|
||||
|
||||
// Admins can toggle its color with advanced admin interaction
|
||||
/turf/simulated/floor/light/disco/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
change_color()
|
||||
|
||||
// One is able to restart it, if power runs out. However, it cannot be turned off!
|
||||
/turf/simulated/floor/light/disco/attack_hand(mob/user)
|
||||
if(!on)
|
||||
toggle_light(TRUE)
|
||||
|
||||
/turf/simulated/floor/light/disco/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Reference in New Issue
Block a user