mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 02:25:06 +01:00
Merge branch 'master' into Arokha/matdefs
This commit is contained in:
@@ -0,0 +1,561 @@
|
||||
|
||||
///////////
|
||||
// EASEL //
|
||||
///////////
|
||||
|
||||
/obj/structure/easel
|
||||
name = "easel"
|
||||
desc = "Only for the finest of art!"
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "easel"
|
||||
density = TRUE
|
||||
//resistance_flags = FLAMMABLE
|
||||
//max_integrity = 60
|
||||
var/obj/item/canvas/painting = null
|
||||
|
||||
//Adding canvases
|
||||
/obj/structure/easel/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/canvas))
|
||||
var/obj/item/canvas/canvas = I
|
||||
user.drop_from_inventory(canvas)
|
||||
painting = canvas
|
||||
canvas.forceMove(get_turf(src))
|
||||
canvas.layer = layer+0.1
|
||||
user.visible_message("<span class='notice'>[user] puts \the [canvas] on \the [src].</span>","<span class='notice'>You place \the [canvas] on \the [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//Stick to the easel like glue
|
||||
/obj/structure/easel/Move()
|
||||
var/turf/T = get_turf(src)
|
||||
. = ..()
|
||||
if(painting && painting.loc == T) //Only move if it's near us.
|
||||
painting.forceMove(get_turf(src))
|
||||
else
|
||||
painting = null
|
||||
|
||||
/obj/item/canvas
|
||||
name = "canvas"
|
||||
desc = "Draw out your soul on this canvas!"
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "11x11"
|
||||
//flags_1 = UNPAINTABLE_1
|
||||
//resistance_flags = FLAMMABLE
|
||||
var/width = 11
|
||||
var/height = 11
|
||||
var/list/grid
|
||||
var/canvas_color = "#ffffff" //empty canvas color
|
||||
var/used = FALSE
|
||||
var/painting_name = "Untitled Artwork" //Painting name, this is set after framing.
|
||||
var/finalized = FALSE //Blocks edits
|
||||
var/author_name
|
||||
var/author_ckey
|
||||
var/icon_generated = FALSE
|
||||
var/icon/generated_icon
|
||||
///boolean that blocks persistence from saving it. enabled from printing copies, because we do not want to save copies.
|
||||
var/no_save = FALSE
|
||||
|
||||
/// From the origin of the turf we're on, where should the left of the canvas pixel be
|
||||
var/framed_offset_x = 11
|
||||
/// From the origin of the turf we're on, where should the bottom of the canvas be
|
||||
var/framed_offset_y = 10
|
||||
/// The frame takes the painting's offset, then moves this X offset
|
||||
var/frame_offset_x = -1
|
||||
/// The frame takes the painting's offset, then moves this Y offset
|
||||
var/frame_offset_y = -1
|
||||
|
||||
pixel_x = 10
|
||||
pixel_y = 9
|
||||
|
||||
/obj/item/canvas/Initialize()
|
||||
. = ..()
|
||||
reset_grid()
|
||||
|
||||
/obj/item/canvas/proc/reset_grid()
|
||||
grid = new/list(width,height)
|
||||
for(var/x in 1 to width)
|
||||
for(var/y in 1 to height)
|
||||
grid[x][y] = canvas_color
|
||||
|
||||
/obj/item/canvas/attack_self(mob/user)
|
||||
. = ..()
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/canvas/dropped(mob/user)
|
||||
pixel_x = initial(pixel_x)
|
||||
pixel_y = initial(pixel_y)
|
||||
return ..()
|
||||
|
||||
/obj/item/canvas/tgui_state(mob/user)
|
||||
if(finalized)
|
||||
return GLOB.tgui_physical_obscured_state
|
||||
else
|
||||
return GLOB.tgui_default_state
|
||||
|
||||
/obj/item/canvas/tgui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Canvas", name)
|
||||
ui.set_autoupdate(FALSE)
|
||||
ui.open()
|
||||
|
||||
/obj/item/canvas/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/paint_palette))
|
||||
var/choice = tgui_alert(user, "Adjusting the base color of this canvas will replace ALL pixels with the selected color. Are you sure?", "Confirm Color Fill", list("Yes", "No"))
|
||||
if(choice == "No")
|
||||
return
|
||||
var/basecolor = input(user, "Select a base color for the canvas:", "Base Color", canvas_color) as null|color
|
||||
if(basecolor && Adjacent(user, src) && Adjacent(user, I))
|
||||
canvas_color = basecolor
|
||||
reset_grid()
|
||||
user.visible_message("[user] smears paint on [src], covering the entire thing in paint.", "You smear paint on [src], changing the color of the entire thing.", runemessage = "smears paint")
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
if(user.a_intent == I_HELP)
|
||||
tgui_interact(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/canvas/tgui_data(mob/user)
|
||||
. = ..()
|
||||
.["grid"] = grid
|
||||
.["name"] = painting_name
|
||||
.["finalized"] = finalized
|
||||
|
||||
/obj/item/canvas/examine(mob/user)
|
||||
. = ..()
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/canvas/tgui_act(action, params)
|
||||
. = ..()
|
||||
if(. || finalized)
|
||||
return
|
||||
var/mob/user = usr
|
||||
switch(action)
|
||||
if("paint")
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
var/color = get_paint_tool_color(I)
|
||||
if(!color)
|
||||
return FALSE
|
||||
var/x = text2num(params["x"])
|
||||
var/y = text2num(params["y"])
|
||||
grid[x][y] = color
|
||||
used = TRUE
|
||||
update_appearance()
|
||||
. = TRUE
|
||||
if("finalize")
|
||||
. = TRUE
|
||||
if(!finalized)
|
||||
finalize(user)
|
||||
|
||||
/obj/item/canvas/proc/finalize(mob/user)
|
||||
finalized = TRUE
|
||||
author_name = user.real_name
|
||||
author_ckey = user.ckey
|
||||
generate_proper_overlay()
|
||||
try_rename(user)
|
||||
|
||||
/obj/item/canvas/proc/update_appearance()
|
||||
cut_overlays()
|
||||
if(icon_generated)
|
||||
var/mutable_appearance/detail = mutable_appearance(generated_icon)
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
add_overlay(detail)
|
||||
return
|
||||
if(!used)
|
||||
return
|
||||
|
||||
var/mutable_appearance/detail = mutable_appearance(icon, "[icon_state]wip")
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
add_overlay(detail)
|
||||
|
||||
/obj/item/canvas/proc/generate_proper_overlay()
|
||||
if(icon_generated)
|
||||
return
|
||||
var/png_filename = "data/persistent/paintings/temp_painting.png"
|
||||
var/result = rustg_dmi_create_png(png_filename,"[width]","[height]",get_data_string())
|
||||
if(result)
|
||||
CRASH("Error generating painting png : [result]")
|
||||
generated_icon = new(png_filename)
|
||||
icon_generated = TRUE
|
||||
update_appearance()
|
||||
|
||||
/obj/item/canvas/proc/get_data_string()
|
||||
var/list/data = list()
|
||||
for(var/y in 1 to height)
|
||||
for(var/x in 1 to width)
|
||||
data += grid[x][y]
|
||||
return data.Join("")
|
||||
|
||||
//Todo make this element ?
|
||||
/obj/item/canvas/proc/get_paint_tool_color(obj/item/I)
|
||||
if(!I)
|
||||
return
|
||||
if(istype(I, /obj/item/paint_brush))
|
||||
var/obj/item/paint_brush/P = I
|
||||
return P.selected_color
|
||||
else if(istype(I, /obj/item/weapon/pen/crayon))
|
||||
var/obj/item/weapon/pen/crayon/crayon = I
|
||||
return crayon.colour
|
||||
else if(istype(I, /obj/item/weapon/pen))
|
||||
var/obj/item/weapon/pen/P = I
|
||||
switch(P.colour)
|
||||
if("black")
|
||||
return "#000000"
|
||||
if("blue")
|
||||
return "#0000ff"
|
||||
if("red")
|
||||
return "#ff0000"
|
||||
return P.colour
|
||||
else if(istype(I, /obj/item/weapon/soap) || istype(I, /obj/item/weapon/reagent_containers/glass/rag))
|
||||
return canvas_color
|
||||
|
||||
/obj/item/canvas/proc/try_rename(mob/user)
|
||||
var/new_name = stripped_input(user,"What do you want to name the painting?")
|
||||
if(new_name != painting_name && new_name && CanUseTopic(user, GLOB.tgui_physical_state))
|
||||
painting_name = new_name
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/item/canvas/nineteen_nineteen
|
||||
icon_state = "19x19"
|
||||
width = 19
|
||||
height = 19
|
||||
pixel_x = 5
|
||||
pixel_y = 10
|
||||
framed_offset_x = 8
|
||||
framed_offset_y = 9
|
||||
|
||||
/obj/item/canvas/twentythree_nineteen
|
||||
icon_state = "23x19"
|
||||
width = 23
|
||||
height = 19
|
||||
pixel_x = 4
|
||||
pixel_y = 10
|
||||
framed_offset_x = 6
|
||||
framed_offset_y = 8
|
||||
|
||||
/obj/item/canvas/twentythree_twentythree
|
||||
icon_state = "23x23"
|
||||
width = 23
|
||||
height = 23
|
||||
pixel_x = 5
|
||||
pixel_y = 9
|
||||
framed_offset_x = 5
|
||||
framed_offset_y = 6
|
||||
|
||||
/obj/item/canvas/twentyfour_twentyfour
|
||||
name = "ai universal standard canvas"
|
||||
//desc = "Besides being very large, the AI can accept these as a display from their internal database after you've hung it up." // Not yet
|
||||
icon_state = "24x24"
|
||||
width = 24
|
||||
height = 24
|
||||
pixel_x = 2
|
||||
pixel_y = 2
|
||||
framed_offset_x = 4
|
||||
framed_offset_y = 4
|
||||
frame_offset_x = -2
|
||||
frame_offset_y = -2
|
||||
|
||||
/obj/item/paint_brush
|
||||
name = "artist's paintbrush"
|
||||
desc = "When you really want to put together a masterpiece!"
|
||||
description_info = "Hit this on a palette to set the color, and use it on a canvas to paint with that color."
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "brush"
|
||||
var/selected_color = "#000000"
|
||||
var/image/color_drop
|
||||
var/hud_level = FALSE
|
||||
|
||||
/obj/item/paint_brush/Initialize()
|
||||
. = ..()
|
||||
color_drop = image(icon, null, "brush_color")
|
||||
color_drop.color = selected_color
|
||||
|
||||
// When picked up
|
||||
/obj/item/paint_brush/hud_layerise()
|
||||
. = ..()
|
||||
hud_level = TRUE
|
||||
update_paint()
|
||||
|
||||
// When put down
|
||||
/obj/item/paint_brush/reset_plane_and_layer()
|
||||
. = ..()
|
||||
hud_level = FALSE
|
||||
update_paint()
|
||||
|
||||
/obj/item/paint_brush/proc/update_paint(var/new_color)
|
||||
if(new_color)
|
||||
selected_color = new_color
|
||||
color_drop.color = new_color
|
||||
|
||||
cut_overlays()
|
||||
if(hud_level)
|
||||
add_overlay(color_drop)
|
||||
|
||||
/obj/item/paint_palette
|
||||
name = "artist's palette"
|
||||
desc = "Helps to have a paintbrush, too."
|
||||
description_info = "You can hit this on a canvas to set the entire canvas color (but note that it will wipe out any works in progress). You can hit a paintbrush on this to set the color."
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "palette"
|
||||
|
||||
/obj/item/paint_palette/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/paint_brush))
|
||||
var/obj/item/paint_brush/P = W
|
||||
var/newcolor = input(user, "Select a new paint color:", "Paint Palette", P.selected_color) as null|color
|
||||
if(newcolor && Adjacent(user, P) && Adjacent(user, src))
|
||||
P.update_paint(newcolor)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/frame/painting
|
||||
name = "painting frame"
|
||||
desc = "The perfect showcase for your favorite deathtrap memories."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
//custom_materials = list(/datum/material/wood = 2000)
|
||||
//flags_1 = NONE
|
||||
icon_state = "frame-empty"
|
||||
|
||||
/obj/item/frame/painting/try_build(turf/on_wall, mob/user as mob)
|
||||
if(get_dist(on_wall, user) > 1)
|
||||
return
|
||||
var/ndir = get_dir(on_wall, user)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
if(!istype(on_wall, /turf/simulated/wall))
|
||||
to_chat(user, "<span class='warning'>Frame cannot be placed on this spot.</span>")
|
||||
return
|
||||
new /obj/structure/sign/painting(get_turf(user), ndir, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/sign/painting
|
||||
name = "Painting"
|
||||
desc = "Art or \"Art\"? You decide."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "frame-empty"
|
||||
var/base_icon_state = "frame"
|
||||
//custom_materials = list(/datum/material/wood = 2000)
|
||||
//buildable_sign = FALSE
|
||||
///Canvas we're currently displaying.
|
||||
var/obj/item/canvas/current_canvas
|
||||
///Description set when canvas is added.
|
||||
var/desc_with_canvas
|
||||
var/persistence_id
|
||||
|
||||
//Presets for art gallery mapping, for paintings to be shared across stations
|
||||
/obj/structure/sign/painting/public
|
||||
name = "\improper Public Painting Exhibit mounting"
|
||||
desc = "For art pieces hung by the public."
|
||||
desc_with_canvas = "A piece of art (or \"art\"). Anyone could've hung it."
|
||||
persistence_id = "public"
|
||||
|
||||
/obj/structure/sign/painting/library_secure
|
||||
name = "\improper Curated Painting Exhibit mounting"
|
||||
desc = "For masterpieces hand-picked by the curator."
|
||||
desc_with_canvas = "A masterpiece hand-picked by the curator, supposedly."
|
||||
persistence_id = "library"
|
||||
req_one_access = list(access_library)
|
||||
|
||||
/obj/structure/sign/painting/chapel_secure
|
||||
name = "\improper Religious Painting Exhibit mounting"
|
||||
desc = "For masterpieces hand-picked by the chaplain."
|
||||
desc_with_canvas = "A masterpiece hand-picked by the chaplain, supposedly."
|
||||
persistence_id = "chapel"
|
||||
req_one_access = list(access_chapel_office)
|
||||
|
||||
/obj/structure/sign/painting/library_private // keep your smut away from prying eyes, or non-librarians at least
|
||||
name = "\improper Private Painting Exhibit mounting"
|
||||
desc = "For art pieces deemed too subversive or too illegal to be shared outside of curators."
|
||||
desc_with_canvas = "A painting hung away from lesser minds."
|
||||
persistence_id = "library_private"
|
||||
req_one_access = list(access_library)
|
||||
|
||||
/obj/structure/sign/painting/Initialize(mapload, dir, building)
|
||||
. = ..()
|
||||
if(persistence_id)
|
||||
SSpersistence.painting_frames += src
|
||||
if(dir)
|
||||
set_dir(dir)
|
||||
if(building)
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0
|
||||
|
||||
/obj/structure/sign/painting/Destroy()
|
||||
. = ..()
|
||||
SSpersistence.painting_frames -= src
|
||||
|
||||
/obj/structure/sign/painting/attackby(obj/item/I, mob/user, params)
|
||||
if(!current_canvas && istype(I, /obj/item/canvas))
|
||||
frame_canvas(user, I)
|
||||
else if(current_canvas && current_canvas.painting_name == initial(current_canvas.painting_name) && istype(I,/obj/item/weapon/pen))
|
||||
try_rename(user)
|
||||
else if(current_canvas && I.is_wirecutter())
|
||||
unframe_canvas(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/painting/examine(mob/user)
|
||||
. = ..()
|
||||
if(persistence_id)
|
||||
. += "<span class='notice'>Any painting placed here will be archived at the end of the shift.</span>"
|
||||
if(current_canvas)
|
||||
current_canvas.tgui_interact(user)
|
||||
. += "<span class='notice'>Use wirecutters to remove the painting.</span>"
|
||||
|
||||
/obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='warning'>You're not comfortable framing this canvas in such a prestigious spot!</span>")
|
||||
return
|
||||
if(user.drop_from_inventory(new_canvas, src))
|
||||
current_canvas = new_canvas
|
||||
if(!current_canvas.finalized)
|
||||
current_canvas.finalize(user)
|
||||
to_chat(user,"<span class='notice'>You frame [current_canvas].</span>")
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/sign/painting/proc/unframe_canvas(mob/living/user)
|
||||
if(current_canvas)
|
||||
current_canvas.forceMove(drop_location())
|
||||
current_canvas = null
|
||||
to_chat(user, "<span class='notice'>You remove the painting from the frame.</span>")
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/sign/painting/proc/try_rename(mob/user)
|
||||
if(current_canvas.painting_name == initial(current_canvas.painting_name))
|
||||
current_canvas.try_rename(user)
|
||||
|
||||
/obj/structure/sign/painting/proc/update_appearance()
|
||||
name = current_canvas ? "painting - [current_canvas.painting_name]" : initial(name)
|
||||
desc = current_canvas ? desc_with_canvas : initial(desc)
|
||||
icon_state = "[base_icon_state]-[current_canvas?.generated_icon ? "hidden" : "empty"]"
|
||||
|
||||
cut_overlays()
|
||||
|
||||
if(!current_canvas?.generated_icon)
|
||||
return
|
||||
|
||||
. = list()
|
||||
var/mutable_appearance/MA = mutable_appearance(current_canvas.generated_icon)
|
||||
MA.pixel_x = current_canvas.framed_offset_x
|
||||
MA.pixel_y = current_canvas.framed_offset_y
|
||||
. += MA
|
||||
var/mutable_appearance/frame = mutable_appearance(current_canvas.icon,"[current_canvas.icon_state]frame")
|
||||
frame.pixel_x = current_canvas.framed_offset_x + current_canvas.frame_offset_x
|
||||
frame.pixel_y = current_canvas.framed_offset_y + current_canvas.frame_offset_y
|
||||
. += frame
|
||||
|
||||
add_overlay(.)
|
||||
|
||||
/obj/item/canvas/proc/fill_grid_from_icon(icon/I)
|
||||
var/h = I.Height() + 1
|
||||
for(var/x in 1 to width)
|
||||
for(var/y in 1 to height)
|
||||
grid[x][y] = I.GetPixel(x,h-y)
|
||||
|
||||
/**
|
||||
* Loads a painting from SSpersistence. Called globally by said subsystem when it inits
|
||||
*
|
||||
* Deleting paintings leaves their json, so this proc will remove the json and try again if it finds one of those.
|
||||
*/
|
||||
/obj/structure/sign/painting/proc/load_persistent()
|
||||
if(!persistence_id || !SSpersistence.paintings)
|
||||
return
|
||||
var/list/painting_category = list()
|
||||
for (var/list/P in SSpersistence.paintings)
|
||||
if(P["persistence_id"] == persistence_id)
|
||||
painting_category[++painting_category.len] = P
|
||||
var/list/painting
|
||||
while(!painting)
|
||||
if(!length(painting_category))
|
||||
return //aborts loading anything this category has no usable paintings
|
||||
var/list/chosen = pick(painting_category)
|
||||
if(!fexists("data/persistent/paintings/[persistence_id]/[chosen["md5"]].png")) //shitmin deleted this art, lets remove json entry to avoid errors
|
||||
painting_category -= list(chosen)
|
||||
continue //and try again
|
||||
painting = chosen
|
||||
var/title = painting["title"]
|
||||
var/author_name = painting["author"]
|
||||
var/author_ckey = painting["ckey"]
|
||||
var/png = "data/persistent/paintings/[persistence_id]/[painting["md5"]].png"
|
||||
if(!title)
|
||||
title = "Untitled Artwork" //legacy artwork allowed null names which was bad for the json, lets fix that
|
||||
painting["title"] = title
|
||||
var/icon/I = new(png)
|
||||
var/obj/item/canvas/new_canvas
|
||||
var/w = I.Width()
|
||||
var/h = I.Height()
|
||||
for(var/T in typesof(/obj/item/canvas))
|
||||
new_canvas = T
|
||||
if(initial(new_canvas.width) == w && initial(new_canvas.height) == h)
|
||||
new_canvas = new T(src)
|
||||
break
|
||||
new_canvas.fill_grid_from_icon(I)
|
||||
new_canvas.generated_icon = I
|
||||
new_canvas.icon_generated = TRUE
|
||||
new_canvas.finalized = TRUE
|
||||
new_canvas.painting_name = title
|
||||
new_canvas.author_name = author_name
|
||||
new_canvas.author_ckey = author_ckey
|
||||
new_canvas.name = "painting - [title]"
|
||||
current_canvas = new_canvas
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/sign/painting/proc/save_persistent()
|
||||
if(!persistence_id || !current_canvas || current_canvas.no_save)
|
||||
return
|
||||
if(sanitize_filename(persistence_id) != persistence_id)
|
||||
stack_trace("Invalid persistence_id - [persistence_id]")
|
||||
return
|
||||
if(!current_canvas.painting_name)
|
||||
current_canvas.painting_name = "Untitled Artwork"
|
||||
var/data = current_canvas.get_data_string()
|
||||
var/md5 = md5(lowertext(data))
|
||||
LAZYINITLIST(SSpersistence.paintings)
|
||||
for(var/list/entry in SSpersistence.paintings)
|
||||
if(entry["md5"] == md5)
|
||||
return
|
||||
var/png_directory = "data/persistent/paintings/[persistence_id]/"
|
||||
var/png_path = png_directory + "[md5].png"
|
||||
var/result = rustg_dmi_create_png(png_path,"[current_canvas.width]","[current_canvas.height]",data)
|
||||
if(result)
|
||||
CRASH("Error saving persistent painting: [result]")
|
||||
SSpersistence.paintings += list(list(
|
||||
"persistence_id" = persistence_id,
|
||||
"title" = current_canvas.painting_name,
|
||||
"md5" = md5,
|
||||
"author" = current_canvas.author_name,
|
||||
"ckey" = current_canvas.author_ckey
|
||||
))
|
||||
|
||||
/obj/structure/sign/painting/vv_get_dropdown()
|
||||
. = ..()
|
||||
VV_DROPDOWN_OPTION("removepainting", "Remove Persistent Painting")
|
||||
|
||||
/obj/structure/sign/painting/vv_do_topic(list/href_list)
|
||||
. = ..()
|
||||
if(href_list["removepainting"])
|
||||
if(!check_rights(NONE))
|
||||
return
|
||||
var/mob/user = usr
|
||||
if(!persistence_id || !current_canvas)
|
||||
to_chat(user,"<span class='warning'>This is not a persistent painting.</span>")
|
||||
return
|
||||
var/md5 = md5(lowertext(current_canvas.get_data_string()))
|
||||
var/author = current_canvas.author_ckey
|
||||
var/list/filenames_found = list()
|
||||
for(var/list/entry in SSpersistence.paintings)
|
||||
if(entry["md5"] == md5)
|
||||
filenames_found += "data/persistent/paintings/[entry["persistence_id"]]/[entry["md5"]].png"
|
||||
SSpersistence.paintings -= entry
|
||||
for(var/png in filenames_found)
|
||||
if(fexists(png))
|
||||
fdel(png)
|
||||
for(var/obj/structure/sign/painting/P in SSpersistence.painting_frames)
|
||||
if(P.current_canvas && md5(P.current_canvas.get_data_string()) == md5)
|
||||
QDEL_NULL(P.current_canvas)
|
||||
P.update_appearance()
|
||||
log_and_message_admins("<span class='notice'>[key_name_admin(user)] has deleted persistent painting made by [author].</span>")
|
||||
@@ -30,7 +30,7 @@ LINEN BINS
|
||||
|
||||
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
|
||||
if(is_sharp(I))
|
||||
user.visible_message("<span class='notice'>\The [user] begins cutting up [src] with [I].</span>", "<span class='notice'>You begin cutting up [src] with [I].</span>")
|
||||
user.visible_message("<b>\The [user]</b> begins cutting up [src] with [I].", "<span class='notice'>You begin cutting up [src] with [I].</span>")
|
||||
if(do_after(user, 50))
|
||||
to_chat(user, "<span class='notice'>You cut [src] into pieces!</span>")
|
||||
for(var/i in 1 to rand(2,5))
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
burning = FALSE
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
visible_message("<span class='notice'>\The [src] stops burning.</span>")
|
||||
visible_message("<b>\The [src]</b> stops burning.")
|
||||
|
||||
/obj/structure/bonfire/proc/ignite()
|
||||
if(!burning && get_fuel_amount())
|
||||
@@ -180,8 +180,9 @@
|
||||
O.fire_act(null, 1000, 500)
|
||||
else if(isliving(A) && get_fuel_amount() > 4)
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(get_fuel_amount() / 4)
|
||||
L.IgniteMob()
|
||||
if(!(L.is_incorporeal()))
|
||||
L.adjust_fire_stacks(get_fuel_amount() / 4)
|
||||
L.IgniteMob()
|
||||
|
||||
/obj/structure/bonfire/update_icon()
|
||||
cut_overlays()
|
||||
@@ -353,7 +354,7 @@
|
||||
burning = FALSE
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
visible_message("<span class='notice'>\The [src] stops burning.</span>")
|
||||
visible_message("<b>\The [src]</b> stops burning.")
|
||||
|
||||
/obj/structure/fireplace/proc/ignite()
|
||||
if(!burning && get_fuel_amount())
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
climbers |= user
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(!can_climb(user, post_climb_check=1))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
@@ -42,7 +42,7 @@
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/fitness/boxing_ropes/can_climb(var/mob/living/user, post_climb_check=0) //Sets it to keep people from climbing over into the next turf if it is occupied.
|
||||
if(!..())
|
||||
@@ -84,14 +84,14 @@
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
climbers |= user
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(!can_climb(user, post_climb_check=1))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
@@ -100,7 +100,7 @@
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/fitness/boxing_ropes_bottom/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
if(!..())
|
||||
@@ -143,14 +143,14 @@
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
climbers |= user
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(!can_climb(user, post_climb_check=1))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
@@ -159,7 +159,7 @@
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/fitness/boxing_turnbuckle/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
if(!..())
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(is_stump)
|
||||
if(istype(W,/obj/item/weapon/shovel))
|
||||
if(do_after(user, 5 SECONDS))
|
||||
visible_message("<span class='notice'>\The [user] digs up \the [src] stump with \the [W].</span>")
|
||||
visible_message("<b>\The [user]</b> digs up \the [src] stump with \the [W].")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return
|
||||
|
||||
if(!activated)
|
||||
to_chat(user, "<span class='warning'>\the [src] has not yet been activated. Sorry.</span>")
|
||||
to_chat(user, "<span class='warning'>\The [src] has not yet been activated. Sorry.</span>")
|
||||
return
|
||||
|
||||
if(used)
|
||||
|
||||
@@ -55,14 +55,14 @@
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
climbers |= user
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(!can_climb(user, post_climb_check=1))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
@@ -71,7 +71,7 @@
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/ledge/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
if(!..())
|
||||
|
||||
@@ -129,10 +129,10 @@
|
||||
qdel(contained)
|
||||
contained = new mask_type(src)
|
||||
breather = null
|
||||
src.visible_message("<span class='notice'>\The [contained] slips to \the [src]!</span>")
|
||||
src.visible_message("<b>\The [contained]</b> slips to \the [src]!")
|
||||
update_icon()
|
||||
return
|
||||
usr.visible_message("<span class='notice'>\The [usr] begins carefully placing the mask onto [target].</span>",
|
||||
usr.visible_message("<b>\The [usr]</b> begins carefully placing the mask onto [target].",
|
||||
"<span class='notice'>You begin carefully placing the mask onto [target].</span>")
|
||||
if(!do_mob(usr, target, 100) || !can_apply_to_target(target, usr))
|
||||
return
|
||||
@@ -151,14 +151,14 @@
|
||||
visible_message("\The [attached] is taken off \the [src]")
|
||||
attached = null
|
||||
else if(ishuman(target))
|
||||
usr.visible_message("<span class='notice'>\The [usr] begins inserting needle into [target]'s vein.</span>",
|
||||
usr.visible_message("<b>\The [usr]</b> begins inserting needle into [target]'s vein.",
|
||||
"<span class='notice'>You begin inserting needle into [target]'s vein.</span>")
|
||||
if(!do_mob(usr, target, 50))
|
||||
usr.visible_message("<span class='notice'>\The [usr]'s hand slips and pricks \the [target].</span>",
|
||||
"<span class='notice'>Your hand slips and pricks \the [target].</span>")
|
||||
target.apply_damage(3, BRUTE, pick(BP_R_ARM, BP_L_ARM))
|
||||
return
|
||||
usr.visible_message("<span class='notice'>\The [usr] hooks \the [target] up to \the [src].</span>",
|
||||
usr.visible_message("<b>\The [usr]</b> hooks \the [target] up to \the [src].",
|
||||
"<span class='notice'>You hook \the [target] up to \the [src].</span>")
|
||||
attached = target
|
||||
START_PROCESSING(SSobj,src)
|
||||
@@ -184,13 +184,13 @@
|
||||
to_chat(user, "<span class='warning'>There is no tank in \the [src]!</span>")
|
||||
return
|
||||
else if (tank && is_loosen)
|
||||
user.visible_message("<span class='notice'>\The [user] removes \the [tank] from \the [src].</span>", "<span class='warning'>You remove \the [tank] from \the [src].</span</span>>")
|
||||
user.visible_message("<b>\The [user]</b> removes \the [tank] from \the [src].", "<span class='warning'>You remove \the [tank] from \the [src].</span</span>>")
|
||||
user.put_in_hands(tank)
|
||||
tank = null
|
||||
update_icon()
|
||||
return
|
||||
else if (!is_loosen)
|
||||
user.visible_message("<span class='notice'>\The [user] tries to removes \the [tank] from \the [src] but it won't budge.</span>", "<span class='warning'>You try to removes \the [tank] from \the [src] but it won't budge.</span</span>>")
|
||||
user.visible_message("<b>\The [user]</b> tries to removes \the [tank] from \the [src] but it won't budge.", "<span class='warning'>You try to removes \the [tank] from \the [src] but it won't budge.</span</span>>")
|
||||
return
|
||||
if ("Toggle valve")
|
||||
if (!tank)
|
||||
@@ -198,7 +198,7 @@
|
||||
return
|
||||
else
|
||||
if (valve_opened)
|
||||
src.visible_message("<span class='notice'>\The [user] closes valve on \the [src]!</span>",
|
||||
src.visible_message("<b>\The [user]</b> closes valve on \the [src]!",
|
||||
"<span class='notice'>You close valve on \the [src].</span>")
|
||||
if(breather)
|
||||
breather.internals?.icon_state = "internal0"
|
||||
@@ -206,7 +206,7 @@
|
||||
valve_opened = FALSE
|
||||
update_icon()
|
||||
else
|
||||
src.visible_message("<span class='notice'>\The [user] opens valve on \the [src]!</span>",
|
||||
src.visible_message("<b>\The [user]</b> opens valve on \the [src]!",
|
||||
"<span class='notice'>You open valve on \the [src].</span>")
|
||||
if(breather)
|
||||
breather.internal = tank
|
||||
@@ -319,7 +319,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
tank = W
|
||||
user.visible_message("<span class='notice'>\The [user] attaches \the [tank] to \the [src].</span>", "<span class='notice'>You attach \the [tank] to \the [src].</span>")
|
||||
user.visible_message("<b>\The [user]</b> attaches \the [tank] to \the [src].", "<span class='notice'>You attach \the [tank] to \the [src].</span>")
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
else
|
||||
qdel(contained)
|
||||
contained = new mask_type (src)
|
||||
src.visible_message("<span class='notice'>\The [contained] slips to \the [src]!</span>")
|
||||
src.visible_message("<b>\The [contained]</b> slips to \the [src]!")
|
||||
breather = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -90,11 +90,11 @@
|
||||
|
||||
/obj/structure/prop/prism/proc/rotate_auto(var/new_bearing)
|
||||
if(rotation_lock)
|
||||
visible_message("<span class='notice'>\The [src] shudders.</span>")
|
||||
visible_message("<b>\The [src]</b> shudders.")
|
||||
playsound(src, 'sound/effects/clang.ogg', 50, 1)
|
||||
return
|
||||
|
||||
visible_message("<span class='notice'>\The [src] rotates to a bearing of [new_bearing].</span>")
|
||||
visible_message("<b>\The [src]</b> rotates to a bearing of [new_bearing].")
|
||||
|
||||
var/rotate_degrees = new_bearing - degrees_from_north
|
||||
|
||||
|
||||
@@ -115,6 +115,13 @@
|
||||
icon = 'icons/obj/structures/decor32x64.dmi'
|
||||
icon_state = "eotp"
|
||||
|
||||
// gravity generator from Eris
|
||||
/obj/structure/prop/gravygen
|
||||
icon = 'icons/obj/structures/decor64x64.dmi'
|
||||
icon_state = "bigdice"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
// dna vault from /tg/
|
||||
/obj/structure/prop/dna_vault
|
||||
icon = 'icons/obj/structures/decor96x96.dmi'
|
||||
@@ -271,6 +278,58 @@
|
||||
/obj/structure/prop/nt_solifier/starts_on
|
||||
icon_state = "nt_solidifier_on"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* off: Boring, round
|
||||
* on: Spinny glowy
|
||||
*/
|
||||
// conduit of soul from Eris
|
||||
/obj/structure/prop/conduit
|
||||
icon = 'icons/obj/structures/decor.dmi'
|
||||
icon_state = "conduit_off"
|
||||
|
||||
/obj/structure/prop/conduit/change_state(state)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if("on")
|
||||
icon_state = "conduit_spin"
|
||||
flick("conduit_starting", src)
|
||||
if("off")
|
||||
icon_state = "conduit_off"
|
||||
flick("conduit_stopping", src)
|
||||
|
||||
/obj/structure/prop/conduit/starts_on
|
||||
icon_state = "conduit_spin"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* on: Doing some kinda worky thing
|
||||
* off: Not doing much of anything
|
||||
* empty: No blue crystal thingy
|
||||
* loaded: off but without the animation
|
||||
*/
|
||||
// some kinda NT thing from Eris
|
||||
/obj/structure/prop/core
|
||||
icon = 'icons/obj/structures/decor.dmi'
|
||||
icon_state = "core_inactive"
|
||||
|
||||
/obj/structure/prop/core/change_state(state)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if("on")
|
||||
icon_state = "core_active"
|
||||
flick("core_warmup", src)
|
||||
if("off")
|
||||
icon_state = "core_inactive"
|
||||
flick("core_shutdown", src)
|
||||
if("empty")
|
||||
icon_state = "core_empty"
|
||||
if("loaded")
|
||||
icon_state = "core_inactive"
|
||||
|
||||
/obj/structure/prop/core/starts_on
|
||||
icon_state = "core_active"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* down: In the ground, glowing
|
||||
@@ -278,7 +337,6 @@
|
||||
*/
|
||||
// experimental science destructor from /tg/
|
||||
/obj/structure/prop/tube
|
||||
icon = 'icons/obj/structures/decor.dmi'
|
||||
icon = 'icons/obj/structures/decor32x64.dmi'
|
||||
icon_state = "tube_open"
|
||||
|
||||
@@ -393,6 +451,62 @@
|
||||
/obj/structure/prop/nt_optable/starts_active
|
||||
icon_state = "nt_optable-active"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* idle: The default look
|
||||
* active: Glowy lights in the center
|
||||
* panel_open: Opened panel (wiring)
|
||||
* panel_closed: Closed panel
|
||||
*/
|
||||
// trade beacon from Eris
|
||||
/obj/structure/prop/tradebeacon
|
||||
icon = 'icons/obj/structures/decor.dmi'
|
||||
icon_state = "tradebeacon"
|
||||
|
||||
/obj/structure/prop/tradebeacon/change_state(state)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if("idle")
|
||||
icon_state = "tradebeacon"
|
||||
if("active")
|
||||
icon_state = "tradebeacon_active"
|
||||
if("panel_open")
|
||||
cut_overlay("tradebeacon_panel")
|
||||
add_overlay("tradebeacon_panel")
|
||||
if("panel_closed")
|
||||
cut_overlay("tradebeacon_panel")
|
||||
|
||||
/obj/structure/prop/tradebeacon/starts_active
|
||||
icon_state = "tradebeacon_active"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* idle: The default look
|
||||
* active: Glowy lights in the center
|
||||
* panel_open: Opened panel (wiring)
|
||||
* panel_closed: Closed panel
|
||||
*/
|
||||
// another trade beacon from Eris
|
||||
/obj/structure/prop/tradebeacon2
|
||||
icon = 'icons/obj/structures/decor.dmi'
|
||||
icon_state = "tradebeacon"
|
||||
|
||||
/obj/structure/prop/tradebeacon2/change_state(state)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if("idle")
|
||||
icon_state = "tradebeacon_sending"
|
||||
if("active")
|
||||
icon_state = "tradebeacon_sending_active"
|
||||
if("panel_open")
|
||||
cut_overlay("tradebeacon_sending_panel")
|
||||
add_overlay("tradebeacon_sending_panel")
|
||||
if("panel_closed")
|
||||
cut_overlay("tradebeacon_sending_panel")
|
||||
|
||||
/obj/structure/prop/tradebeacon2/starts_active
|
||||
icon_state = "tradebeacon_sending_active"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* off: Non-spinny
|
||||
@@ -414,6 +528,48 @@
|
||||
/obj/structure/prop/nt_obelisk/starts_on
|
||||
icon_state = "nt_obelisk_on"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* off: Inert
|
||||
* on: Hand destroying machinery
|
||||
*/
|
||||
// 'sorter' from Eris
|
||||
/obj/structure/prop/sorter
|
||||
icon = 'icons/obj/structures/decor.dmi'
|
||||
icon_state = "sorter"
|
||||
|
||||
/obj/structure/prop/sorter/change_state(state)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if("off")
|
||||
icon_state = "sorter"
|
||||
if("on")
|
||||
icon_state = "sorter-process"
|
||||
|
||||
/obj/structure/prop/sorter/starts_on
|
||||
icon_state = "sorter-process"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* off: Inert
|
||||
* on: Hand destroying machinery
|
||||
*/
|
||||
// 'smelter' from Eris
|
||||
/obj/structure/prop/smelter
|
||||
icon = 'icons/obj/structures/decor.dmi'
|
||||
icon_state = "smelter"
|
||||
|
||||
/obj/structure/prop/smelter/change_state(state)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if("off")
|
||||
icon_state = "smelter"
|
||||
if("on")
|
||||
icon_state = "smelter-process"
|
||||
|
||||
/obj/structure/prop/smelter/starts_on
|
||||
icon_state = "smelter-process"
|
||||
|
||||
/**
|
||||
* Possible 'state' options for change_state(state) are:
|
||||
* idle: Not doing anything, with yellow template exposed
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
if(W.is_wrench() && !anchored)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(do_after(user, 20, src))
|
||||
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>", "<span class='notice'>You dismantle \the [src].</span>")
|
||||
user.visible_message("<b>\The [user]</b> dismantles \the [src].", "<span class='notice'>You dismantle \the [src].</span>")
|
||||
new /obj/item/stack/material/steel(get_turf(usr), 2)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -216,13 +216,13 @@
|
||||
if(F.welding)
|
||||
playsound(src, F.usesound, 50, 1)
|
||||
if(do_after(user, 20, src))
|
||||
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>", "<span class='notice'>You repair some damage to \the [src].</span>")
|
||||
user.visible_message("<b>\The [user]</b> repairs some damage to \the [src].", "<span class='notice'>You repair some damage to \the [src].</span>")
|
||||
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
|
||||
return
|
||||
|
||||
// Install
|
||||
if(W.is_screwdriver())
|
||||
user.visible_message(anchored ? "<span class='notice'>\The [user] begins unscrewing \the [src].</span>" : "<span class='notice'>\The [user] begins fasten \the [src].</span>" )
|
||||
user.visible_message(anchored ? "<b>\The [user]</b> begins unscrewing \the [src]." : "<b>\The [user]</b> begins fasten \the [src]." )
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(do_after(user, 10, src))
|
||||
to_chat(user, (anchored ? "<span class='notice'>You have unfastened \the [src] from the floor.</span>" : "<span class='notice'>You have fastened \the [src] to the floor.</span>"))
|
||||
@@ -286,14 +286,14 @@
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
climbers |= user
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(!can_climb(user, post_climb_check=1))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
if(!anchored) take_damage(maxhealth) // Fatboy
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/railing/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
if(!..())
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
var/actual_time = I.toolspeed * 170
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] begins salvaging from \the [src].</span>", \
|
||||
"<b>\The [user]</b> begins salvaging from \the [src].", \
|
||||
"<span class='notice'>You start salvaging from \the [src].</span>")
|
||||
if(do_after(user, actual_time, target = src))
|
||||
user.visible_message( \
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
to_chat(usr, "<span class='warning'>\The [thing] is empty.</span>")
|
||||
return
|
||||
// Clear the vessel.
|
||||
visible_message("<span class='notice'>\The [usr] tips the contents of \the [thing] into \the [src].</span>")
|
||||
visible_message("<b>\The [usr]</b> tips the contents of \the [thing] into \the [src].")
|
||||
thing.reagents.clear_reagents()
|
||||
thing.update_icon()
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
damage = damage / 2
|
||||
take_damage(damage)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||
visible_message("<b>\The [user]</b> bonks \the [src] harmlessly.")
|
||||
user.do_attack_animation(src)
|
||||
return 1
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
if (C.use(1))
|
||||
playsound(src, 'sound/effects/sparks1.ogg', 75, 1)
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] begins to wire \the [src] for electrochromic tinting.</span>", \
|
||||
"<b>\The [user]</b> begins to wire \the [src] for electrochromic tinting.", \
|
||||
"<span class='notice'>You begin to wire \the [src] for electrochromic tinting.</span>", \
|
||||
"You hear sparks.")
|
||||
if(do_after(user, 20 * C.toolspeed, src) && state == 0)
|
||||
|
||||
Reference in New Issue
Block a user