mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-20 22:42:54 +00:00
* Init * Implements `tgui_input_color` * Implements most color wheel conversions to TGUI * Iteration two, went over titles and made sure most color inputs are functional. * Implements preferences for large buttons, swapped buttons, and disabled TGUI * Iteration three... the weird ones. (as null|color) * Removes `as color|null` and `as null|color` * Merge conflict resolution, again. * Color input bundle and panel bundle * CSLint being picky. * Picky `while ()` instead of `while()` * Apply suggestions from code review Co-authored-by: Aylong <69762909+AyIong@users.noreply.github.com> Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> * WIP * de-bri'ish colour into color Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> * Aylong review applied. - Removed an extra space in machine.dm - UI_STATE + Runechat color now uses TGUI_INPUT_COLOR * Apply suggestions from code review Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> * Removes an unintentional space to `paradise.scss` * Update code/modules/tgui/tgui_input/color_input.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> * Adds "is_color" regex from TG * Fixes a few conflicting files * TGUI Merge conflict moment v3 * V4? * V5.... * God please don't explode. Builds TGUI like the linter wants. * Update code/modules/tgui/tgui_input/color_input.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> * Rebuilds TGUI, again <3 * Lint be damned --------- Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> Co-authored-by: Aylong <69762909+AyIong@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
107 lines
3.0 KiB
Plaintext
107 lines
3.0 KiB
Plaintext
#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
|
|
#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1
|
|
|
|
/obj/structure/curtain
|
|
icon = 'icons/obj/curtain.dmi'
|
|
name = "curtain"
|
|
icon_state = "closed"
|
|
face_while_pulling = FALSE
|
|
layer = SHOWER_CLOSED_LAYER
|
|
opacity = TRUE
|
|
density = FALSE
|
|
|
|
/obj/structure/curtain/open
|
|
icon_state = "open"
|
|
layer = SHOWER_OPEN_LAYER
|
|
opacity = FALSE
|
|
|
|
/obj/structure/curtain/attack_hand(mob/user)
|
|
playsound(get_turf(loc), "rustle", 15, TRUE, -5)
|
|
toggle()
|
|
..()
|
|
|
|
/obj/structure/curtain/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
|
switch(damage_type)
|
|
if(BRUTE)
|
|
if(damage_amount)
|
|
playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE)
|
|
else
|
|
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE)
|
|
if(BURN)
|
|
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)
|
|
|
|
/obj/structure/curtain/proc/toggle()
|
|
set_opacity(!opacity)
|
|
if(opacity)
|
|
icon_state = "closed"
|
|
layer = SHOWER_CLOSED_LAYER
|
|
else
|
|
icon_state = "open"
|
|
layer = SHOWER_OPEN_LAYER
|
|
|
|
/obj/structure/curtain/attackby(obj/item/W, mob/user)
|
|
if(istype(W, /obj/item/toy/crayon))
|
|
color = tgui_input_color(user,"Please choose a color.", "Curtain Color")
|
|
return
|
|
return ..()
|
|
|
|
/obj/structure/curtain/screwdriver_act(mob/user, obj/item/I)
|
|
. = TRUE
|
|
if(!I.tool_start_check(src, user, 0))
|
|
return
|
|
if(anchored)
|
|
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
|
if(I.use_tool(src, user, 50, volume = I.tool_volume) && anchored)
|
|
anchored = FALSE
|
|
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
|
else
|
|
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
|
if(I.use_tool(src, user, 50, volume = I.tool_volume) && !anchored)
|
|
anchored = TRUE
|
|
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
|
|
|
|
|
|
|
/obj/structure/curtain/wirecutter_act(mob/user, obj/item/I)
|
|
if(anchored)
|
|
return
|
|
. = TRUE
|
|
if(!I.tool_start_check(src, user, 0))
|
|
return
|
|
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE
|
|
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
|
WIRECUTTER_DISMANTLE_SUCCESS_MESSAGE
|
|
deconstruct()
|
|
|
|
/obj/structure/curtain/deconstruct(disassembled = TRUE)
|
|
new /obj/item/stack/sheet/cloth(loc, 2)
|
|
new /obj/item/stack/sheet/plastic(loc, 2)
|
|
new /obj/item/stack/rods(loc, 1)
|
|
qdel(src)
|
|
|
|
/obj/structure/curtain/black
|
|
name = "black curtain"
|
|
color = "#222222"
|
|
|
|
/obj/structure/curtain/medical
|
|
name = "plastic curtain"
|
|
color = "#B8F5E3"
|
|
alpha = 200
|
|
|
|
/obj/structure/curtain/open/shower
|
|
name = "shower curtain"
|
|
color = "#ACD1E9"
|
|
alpha = 200
|
|
|
|
/obj/structure/curtain/open/shower/engineering
|
|
color = "#FFA500"
|
|
|
|
/obj/structure/curtain/open/shower/security
|
|
color = "#AA0000"
|
|
|
|
/obj/structure/curtain/open/shower/centcom
|
|
color = "#000066"
|
|
|
|
#undef SHOWER_OPEN_LAYER
|
|
#undef SHOWER_CLOSED_LAYER
|