mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into prisoners
This commit is contained in:
@@ -235,7 +235,7 @@
|
||||
if(brain.force_replace_ai_name)
|
||||
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
|
||||
SSblackbox.record_feedback("amount", "ais_created", 1)
|
||||
deadchat_broadcast(" has been brought online at <b>[get_area_name(A, TRUE)]</b>.", "<span class='name'>[A]</span>", follow_target=A)
|
||||
deadchat_broadcast(" has been brought online at <b>[get_area_name(A, TRUE)]</b>.", "<span class='name'>[A]</span>", follow_target=A, message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
qdel(src)
|
||||
else
|
||||
state = AI_READY_CORE
|
||||
|
||||
@@ -39,21 +39,29 @@
|
||||
name = "canvas"
|
||||
desc = "Draw out your soul on this canvas!"
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "square"
|
||||
icon_state = "11x11"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/width = 11
|
||||
var/height = 11
|
||||
var/list/grid
|
||||
var/list/top_colors
|
||||
var/canvas_color = "#ffffff" //empty canvas color
|
||||
var/ui_x = 400
|
||||
var/ui_y = 400
|
||||
var/used = FALSE
|
||||
var/painting_name //Painting name, this is set after framing.
|
||||
var/framed = FALSE //Blocks edits, set on framing
|
||||
var/finalized = FALSE //Blocks edits
|
||||
var/icon_generated = FALSE
|
||||
var/icon/generated_icon
|
||||
|
||||
// Painting overlay offset when framed
|
||||
var/framed_offset_x = 11
|
||||
var/framed_offset_y = 10
|
||||
|
||||
pixel_x = 10
|
||||
pixel_y = 9
|
||||
|
||||
/obj/item/canvas/Initialize()
|
||||
. = ..()
|
||||
top_colors = list()
|
||||
reset_grid()
|
||||
|
||||
/obj/item/canvas/proc/reset_grid()
|
||||
@@ -85,6 +93,7 @@
|
||||
. = ..()
|
||||
.["grid"] = grid
|
||||
.["name"] = painting_name
|
||||
.["finalized"] = finalized
|
||||
|
||||
/obj/item/canvas/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -92,7 +101,7 @@
|
||||
|
||||
/obj/item/canvas/ui_act(action, params)
|
||||
. = ..()
|
||||
if(. || framed)
|
||||
if(. || finalized)
|
||||
return
|
||||
var/mob/user = usr
|
||||
switch(action)
|
||||
@@ -104,34 +113,50 @@
|
||||
var/x = text2num(params["x"])
|
||||
var/y = text2num(params["y"])
|
||||
grid[x][y] = color
|
||||
top_colors = get_most_common_colors(3)
|
||||
used = TRUE
|
||||
update_icon()
|
||||
. = TRUE
|
||||
if("finalize")
|
||||
. = TRUE
|
||||
if(!finalized)
|
||||
finalize(user)
|
||||
|
||||
/obj/item/canvas/proc/finalize(mob/user)
|
||||
finalized = TRUE
|
||||
generate_proper_overlay()
|
||||
try_rename(user)
|
||||
|
||||
/obj/item/canvas/update_overlays()
|
||||
. = ..()
|
||||
for(var/i in 2 to top_colors.len) //first is used as base color
|
||||
var/mutable_appearance/detail = mutable_appearance(icon, "[icon_state]_detail_[i-1]")
|
||||
detail.appearance_flags |= RESET_COLOR
|
||||
detail.color = top_colors[i]
|
||||
if(!icon_generated)
|
||||
if(used)
|
||||
var/mutable_appearance/detail = mutable_appearance(icon,"[icon_state]wip")
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
else
|
||||
var/mutable_appearance/detail = mutable_appearance(generated_icon)
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
|
||||
/obj/item/canvas/update_icon_state()
|
||||
. = ..()
|
||||
if(top_colors.len)
|
||||
color = top_colors[1]
|
||||
/obj/item/canvas/proc/generate_proper_overlay()
|
||||
if(icon_generated)
|
||||
return
|
||||
var/png_filename = "data/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_icon()
|
||||
|
||||
/obj/item/canvas/proc/get_most_common_colors(count)
|
||||
var/list/tally = list()
|
||||
for(var/x in 1 to width)
|
||||
for(var/y in 1 to height)
|
||||
tally[grid[x][y]] += 1
|
||||
sortTim(tally,/proc/cmp_numeric_dsc,associative=TRUE)
|
||||
. = list()
|
||||
for(var/result in tally)
|
||||
. += result
|
||||
if(length(.) >= count)
|
||||
break
|
||||
/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)
|
||||
@@ -153,27 +178,44 @@
|
||||
else if(istype(I, /obj/item/soap) || istype(I, /obj/item/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(!painting_name && new_name && user.canUseTopic(src,BE_CLOSE))
|
||||
painting_name = new_name
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/item/canvas/nineteenXnineteen
|
||||
icon_state = "square"
|
||||
icon_state = "19x19"
|
||||
width = 19
|
||||
height = 19
|
||||
ui_x = 600
|
||||
ui_y = 600
|
||||
pixel_x = 6
|
||||
pixel_y = 9
|
||||
framed_offset_x = 8
|
||||
framed_offset_y = 9
|
||||
|
||||
/obj/item/canvas/twentythreeXnineteen
|
||||
icon_state = "wide"
|
||||
icon_state = "23x19"
|
||||
width = 23
|
||||
height = 19
|
||||
ui_x = 800
|
||||
ui_y = 600
|
||||
pixel_x = 4
|
||||
pixel_y = 10
|
||||
framed_offset_x = 6
|
||||
framed_offset_y = 8
|
||||
|
||||
/obj/item/canvas/twentythreeXtwentythree
|
||||
icon_state = "square"
|
||||
icon_state = "23x23"
|
||||
width = 23
|
||||
height = 23
|
||||
ui_x = 800
|
||||
ui_y = 800
|
||||
|
||||
pixel_x = 5
|
||||
pixel_y = 9
|
||||
framed_offset_x = 5
|
||||
framed_offset_y = 6
|
||||
|
||||
/obj/item/wallframe/painting
|
||||
name = "painting frame"
|
||||
@@ -191,6 +233,7 @@
|
||||
icon_state = "frame-empty"
|
||||
buildable_sign = FALSE
|
||||
var/obj/item/canvas/C
|
||||
var/persistence_id
|
||||
|
||||
/obj/structure/sign/painting/Initialize(mapload, dir, building)
|
||||
. = ..()
|
||||
@@ -217,7 +260,6 @@
|
||||
/obj/structure/sign/painting/wirecutter_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(C)
|
||||
C.framed = FALSE
|
||||
C.forceMove(drop_location())
|
||||
C = null
|
||||
to_chat(user, "<span class='notice'>You remove the painting from the frame.</span>")
|
||||
@@ -227,20 +269,98 @@
|
||||
/obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas)
|
||||
if(user.transferItemToLoc(new_canvas,src))
|
||||
C = new_canvas
|
||||
C.framed = TRUE
|
||||
if(!C.finalized)
|
||||
C.finalize(user)
|
||||
to_chat(user,"<span class='notice'>You frame [C].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/painting/proc/try_rename(mob/user)
|
||||
var/new_name = stripped_input(user,"What do you want to name the painting?")
|
||||
if(C && !C.painting_name && new_name && user.canUseTopic(src,BE_CLOSE))
|
||||
C.painting_name = new_name
|
||||
SStgui.update_uis(C)
|
||||
if(!C.painting_name)
|
||||
C.try_rename(user)
|
||||
|
||||
/obj/structure/sign/painting/update_icon_state()
|
||||
. = ..()
|
||||
if(C && C.generated_icon)
|
||||
icon_state = null
|
||||
else
|
||||
icon_state = "frame-empty"
|
||||
|
||||
|
||||
/obj/structure/sign/painting/update_overlays()
|
||||
. = ..()
|
||||
if(C && C.top_colors.len)
|
||||
var/mutable_appearance/MA = mutable_appearance(icon, "frame-content-overlay")
|
||||
MA.appearance_flags |= RESET_COLOR
|
||||
MA.color = C.top_colors[1]
|
||||
if(C && C.generated_icon)
|
||||
var/mutable_appearance/MA = mutable_appearance(C.generated_icon)
|
||||
MA.pixel_x = C.framed_offset_x
|
||||
MA.pixel_y = C.framed_offset_y
|
||||
. += MA
|
||||
var/mutable_appearance/frame = mutable_appearance(C.icon,"[C.icon_state]frame")
|
||||
frame.pixel_x = C.framed_offset_x - 1
|
||||
frame.pixel_y = C.framed_offset_y - 1
|
||||
. += frame
|
||||
|
||||
/obj/structure/sign/painting/proc/load_persistent()
|
||||
if(!persistence_id)
|
||||
return
|
||||
if(!SSpersistence.paintings || !SSpersistence.paintings[persistence_id] || !length(SSpersistence.paintings[persistence_id]))
|
||||
return
|
||||
var/list/chosen = pick(SSpersistence.paintings[persistence_id])
|
||||
var/title = chosen["title"]
|
||||
var/png = "data/paintings/[persistence_id]/[chosen["md5"]].png"
|
||||
if(!fexists(png))
|
||||
stack_trace("Persistent painting [chosen["md5"]].png was not found in [persistence_id] directory.")
|
||||
return
|
||||
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
|
||||
C = new_canvas
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/painting/proc/save_persistent()
|
||||
if(!persistence_id || !C)
|
||||
return
|
||||
if(sanitize_filename(persistence_id) != persistence_id)
|
||||
stack_trace("Invalid persistence_id - [persistence_id]")
|
||||
return
|
||||
var/data = C.get_data_string()
|
||||
var/md5 = md5(data)
|
||||
var/list/current = SSpersistence.paintings[persistence_id]
|
||||
if(!current)
|
||||
current = list()
|
||||
for(var/list/entry in current)
|
||||
if(entry["md5"] == md5)
|
||||
return
|
||||
var/png_directory = "data/paintings/[persistence_id]/"
|
||||
var/png_path = png_directory + "[md5].png"
|
||||
var/result = rustg_dmi_create_png(png_path,"[C.width]","[C.height]",data)
|
||||
if(result)
|
||||
CRASH("Error saving persistent painting: [result]")
|
||||
current += list(list("title" = C.painting_name , "md5" = md5))
|
||||
SSpersistence.paintings[persistence_id] = current
|
||||
|
||||
/obj/item/canvas/proc/fill_grid_from_icon(icon/I)
|
||||
var/w = I.Width() + 1
|
||||
var/h = I.Height() + 1
|
||||
for(var/x in 1 to width)
|
||||
for(var/y in 1 to height)
|
||||
grid[x][y] = I.GetPixel(w-x,h-y)
|
||||
|
||||
//Presets for art gallery mapping, for paintings to be shared across stations
|
||||
/obj/structure/sign/painting/library
|
||||
persistence_id = "library"
|
||||
|
||||
/obj/structure/sign/painting/library_secure
|
||||
persistence_id = "library_secure"
|
||||
|
||||
/obj/structure/sign/painting/library_private // keep your smut away from prying eyes, or non-librarians at least
|
||||
persistence_id = "library_private"
|
||||
|
||||
@@ -218,7 +218,7 @@ LINEN BINS
|
||||
dream_messages = list("a book", "an explosion", "lightning", "a staff", "a skeleton", "a robe", "magic")
|
||||
|
||||
/obj/item/bedsheet/nanotrasen
|
||||
name = "nanotrasen bedsheet"
|
||||
name = "\improper Nanotrasen bedsheet"
|
||||
desc = "It has the Nanotrasen logo on it and has an aura of duty."
|
||||
icon_state = "sheetNT"
|
||||
item_state = "sheetNT"
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
/obj/structure/closet/container_resist(mob/living/user)
|
||||
if(opened)
|
||||
return
|
||||
if(ismovableatom(loc))
|
||||
if(ismovable(loc))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/clothing/suit/armor/vest/det_suit(src)
|
||||
new /obj/item/storage/belt/holster/full(src)
|
||||
new /obj/item/storage/belt/holster/detective/full(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
new /obj/item/twohanded/binoculars(src)
|
||||
new /obj/item/storage/box/rxglasses/spyglasskit(src)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
new /obj/item/storage/belt/military(src)
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/clothing/glasses/night(src)
|
||||
new /obj/item/storage/belt/holster/nukie(src)
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party."
|
||||
|
||||
@@ -323,3 +323,17 @@
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
new mineral_path(T, 2)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/door_assembly/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
if(the_rcd.mode == RCD_DECONSTRUCT)
|
||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 16)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/door_assembly/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
to_chat(user, "<span class='notice'>You deconstruct [src].</span>")
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
if(burn_time_remaining() < MAXIMUM_BURN_TIMER)
|
||||
flame_expiry_timer = world.time + MAXIMUM_BURN_TIMER
|
||||
else
|
||||
fuel_added = CLAMP(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
|
||||
fuel_added = clamp(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
|
||||
|
||||
/obj/structure/fireplace/proc/burn_time_remaining()
|
||||
if(lit)
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
/obj/item/twohanded/required/kirbyplants/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/tactical)
|
||||
addtimer(CALLBACK(src, /datum.proc/AddComponent, /datum/component/beauty, 500), 0)
|
||||
addtimer(CALLBACK(src, /datum.proc/_AddComponent, list(/datum/component/beauty, 500)), 0)
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/random
|
||||
icon = 'icons/obj/flora/_flora.dmi'
|
||||
|
||||
@@ -178,19 +178,6 @@
|
||||
density = TRUE
|
||||
deconstructible = FALSE
|
||||
|
||||
/obj/structure/fluff/railing
|
||||
name = "railing"
|
||||
desc = "Basic railing meant to protect idiots like you from falling."
|
||||
icon = 'icons/obj/fluff.dmi'
|
||||
icon_state = "railing"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
deconstructible = FALSE
|
||||
|
||||
/obj/structure/fluff/railing/corner
|
||||
icon_state = "railing_corner"
|
||||
density = FALSE
|
||||
|
||||
/obj/structure/fluff/beach_towel
|
||||
name = "beach towel"
|
||||
desc = "A towel decorated in various beach-themed designs."
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
/obj/structure/girder/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSGRILLE)
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
/obj/structure/grille/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSGRILLE)
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES | ZAP_IS_TESLA) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
density = TRUE
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/storage/bag/trash/mybag = null
|
||||
var/obj/item/mop/mymop = null
|
||||
var/obj/item/reagent_containers/spray/cleaner/myspray = null
|
||||
var/obj/item/lightreplacer/myreplacer = null
|
||||
var/obj/item/storage/bag/trash/mybag
|
||||
var/obj/item/mop/mymop
|
||||
var/obj/item/twohanded/broom/mybroom
|
||||
var/obj/item/reagent_containers/spray/cleaner/myspray
|
||||
var/obj/item/lightreplacer/myreplacer
|
||||
var/signs = 0
|
||||
var/const/max_signs = 4
|
||||
|
||||
@@ -50,7 +51,12 @@
|
||||
m.janicart_insert(user, src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
|
||||
else if(istype(I, /obj/item/twohanded/broom))
|
||||
if(!mybroom)
|
||||
var/obj/item/twohanded/broom/b=I
|
||||
b.janicart_insert(user,src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/storage/bag/trash))
|
||||
if(!mybag)
|
||||
var/obj/item/storage/bag/trash/t=I
|
||||
@@ -98,6 +104,8 @@
|
||||
dat += "<a href='?src=[REF(src)];garbage=1'>[mybag.name]</a><br>"
|
||||
if(mymop)
|
||||
dat += "<a href='?src=[REF(src)];mop=1'>[mymop.name]</a><br>"
|
||||
if(mybroom)
|
||||
dat += "<a href='?src=[REF(src)];broom=1'>[mybroom.name]</a><br>"
|
||||
if(myspray)
|
||||
dat += "<a href='?src=[REF(src)];spray=1'>[myspray.name]</a><br>"
|
||||
if(myreplacer)
|
||||
@@ -125,6 +133,11 @@
|
||||
user.put_in_hands(mymop)
|
||||
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
|
||||
mymop = null
|
||||
if(href_list["broom"])
|
||||
if(mybroom)
|
||||
user.put_in_hands(mybroom)
|
||||
to_chat(user, "<span class='notice'>You take [mybroom] from [src].</span>")
|
||||
mybroom = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
@@ -156,6 +169,8 @@
|
||||
. += "cart_garbage"
|
||||
if(mymop)
|
||||
. += "cart_mop"
|
||||
if(mybroom)
|
||||
. += "cart_broom"
|
||||
if(myspray)
|
||||
. += "cart_spray"
|
||||
if(myreplacer)
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
add_overlay(I)
|
||||
|
||||
/obj/structure/geyser/process()
|
||||
if(activated && reagents.total_volume <= reagents.maximum_volume) //this is also evaluated in add_reagent, but from my understanding proc calls are expensive and should be avoided in continous
|
||||
reagents.add_reagent(reagent_id, potency) //processes
|
||||
if(activated && reagents.total_volume <= reagents.maximum_volume) //this is also evaluated in add_reagent, but from my understanding proc calls are expensive
|
||||
reagents.add_reagent(reagent_id, potency)
|
||||
|
||||
/obj/structure/geyser/plunger_act(obj/item/plunger/P, mob/living/user, _reinforced)
|
||||
if(!_reinforced)
|
||||
@@ -39,12 +39,12 @@
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start vigorously plunging [src]!</span>")
|
||||
if(do_after(user, 50*P.plunge_mod, target = src) && !activated)
|
||||
if(do_after(user, 50 * P.plunge_mod, target = src) && !activated)
|
||||
start_chemming()
|
||||
|
||||
/obj/structure/geyser/random
|
||||
erupting_state = null
|
||||
var/list/options = list(/datum/reagent/fuel/oil = 2, /datum/reagent/clf3 = 1) //fucking add more
|
||||
var/list/options = list(/datum/reagent/clf3 = 10, /datum/reagent/water/hollowwater = 10, /datum/reagent/medicine/omnizine/protozine = 6, /datum/reagent/wittel = 1)
|
||||
|
||||
/obj/structure/geyser/random/Initialize()
|
||||
. = ..()
|
||||
@@ -72,3 +72,5 @@
|
||||
|
||||
reinforced = TRUE
|
||||
plunge_mod = 0.8
|
||||
|
||||
custom_premium_price = 1200
|
||||
|
||||
@@ -342,7 +342,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
|
||||
if(!ismovableatom(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
if(!ismob(O))
|
||||
if(!istype(O, /obj/structure/closet/body_bag))
|
||||
@@ -387,6 +387,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
|
||||
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
else
|
||||
cur_oct[cur_note] = text2num(ni)
|
||||
if(user.dizziness > 0 && prob(user.dizziness / 2))
|
||||
cur_note = CLAMP(cur_note + rand(round(-user.dizziness / 10), round(user.dizziness / 10)), 1, 7)
|
||||
cur_note = clamp(cur_note + rand(round(-user.dizziness / 10), round(user.dizziness / 10)), 1, 7)
|
||||
if(user.dizziness > 0 && prob(user.dizziness / 5))
|
||||
if(prob(30))
|
||||
cur_acc[cur_note] = "#"
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/obj/structure/railing
|
||||
name = "railing"
|
||||
desc = "Basic railing meant to protect idiots like you from falling."
|
||||
icon = 'icons/obj/fluff.dmi'
|
||||
icon_state = "railing"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
climbable = TRUE
|
||||
|
||||
/obj/structure/railing/corner //aesthetic corner sharp edges hurt oof ouch
|
||||
icon_state = "railing_corner"
|
||||
density = FALSE
|
||||
climbable = FALSE
|
||||
|
||||
/obj/structure/railing/attackby(obj/item/I, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
obj_integrity = max_integrity
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
|
||||
if(!(flags_1&NODECONSTRUCT_1))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unfasten the railing from":"fasten the railing to"] the floor...</span>")
|
||||
if(I.use_tool(src, user, volume = 75, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
|
||||
setAnchored(!anchored)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the railing to":"unfasten the railing from"] the floor.</span>")
|
||||
return
|
||||
|
||||
/obj/structure/railing/proc/check_anchored(checked_anchored)
|
||||
if(anchored == checked_anchored)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
|
||||
..()
|
||||
if(get_dir(loc, target) & dir)
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/corner/CanPass()
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/CheckExit(atom/movable/O, turf/target)
|
||||
..()
|
||||
if(get_dir(loc, target) & dir)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/railing/corner/CheckExit()
|
||||
return 1
|
||||
@@ -69,13 +69,13 @@
|
||||
icon_state = "firefighter"
|
||||
|
||||
/obj/structure/showcase/machinery/implanter
|
||||
name = "Nanotrasen automated mindshield implanter exhibit"
|
||||
name = "\improper Nanotrasen automated mindshield implanter exhibit"
|
||||
desc = "A flimsy model of a standard Nanotrasen automated mindshield implant machine. With secure positioning harnesses and a robotic surgical injector, brain damage and other serious medical anomalies are now up to 60% less likely!"
|
||||
icon = 'icons/obj/machines/implantchair.dmi'
|
||||
icon_state = "implantchair"
|
||||
|
||||
/obj/structure/showcase/machinery/microwave
|
||||
name = "Nanotrasen-brand microwave"
|
||||
name = "\improper Nanotrasen-brand microwave"
|
||||
desc = "The famous Nanotrasen-brand microwave, the multi-purpose cooking appliance every station needs! This one appears to be drawn onto a cardboard box."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "mw"
|
||||
@@ -91,7 +91,7 @@
|
||||
desc = "A stand with a model of the perfect Nanotrasen Employee bolted to it. Signs indicate it is robustly genetically engineered, as well as being ruthlessly loyal."
|
||||
|
||||
/obj/structure/showcase/machinery/tv
|
||||
name = "Nanotrasen corporate newsfeed"
|
||||
name = "\improper Nanotrasen corporate newsfeed"
|
||||
desc = "A slightly battered looking TV. Various Nanotrasen infomercials play on a loop, accompanied by a jaunty tune."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "television"
|
||||
|
||||
@@ -98,102 +98,12 @@
|
||||
wash_atom(AM)
|
||||
|
||||
/obj/machinery/shower/proc/wash_atom(atom/A)
|
||||
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
A.washed(src)
|
||||
reagents.reaction(A, TOUCH, reaction_volume)
|
||||
|
||||
if(isobj(A))
|
||||
wash_obj(A)
|
||||
else if(isturf(A))
|
||||
wash_turf(A)
|
||||
else if(isliving(A))
|
||||
wash_mob(A)
|
||||
if(isliving(A))
|
||||
check_heat(A)
|
||||
|
||||
contamination_cleanse(A)
|
||||
|
||||
/obj/machinery/shower/proc/wash_obj(obj/O)
|
||||
. = SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
O.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/wash_turf(turf/tile)
|
||||
SEND_SIGNAL(tile, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
tile.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
for(var/obj/effect/E in tile)
|
||||
if(is_cleanable(E))
|
||||
qdel(E)
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/wash_mob(mob/living/L)
|
||||
SEND_SIGNAL(L, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
L.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/M = L
|
||||
. = TRUE
|
||||
|
||||
for(var/obj/item/I in M.held_items)
|
||||
wash_obj(I)
|
||||
|
||||
if(M.back && wash_obj(M.back))
|
||||
M.update_inv_back(0)
|
||||
|
||||
var/list/obscured = M.check_obscured_slots()
|
||||
|
||||
if(M.head && wash_obj(M.head))
|
||||
M.update_inv_head()
|
||||
|
||||
if(M.glasses && !(ITEM_SLOT_EYES in obscured) && wash_obj(M.glasses))
|
||||
M.update_inv_glasses()
|
||||
|
||||
if(M.wear_mask && !(ITEM_SLOT_MASK in obscured) && wash_obj(M.wear_mask))
|
||||
M.update_inv_wear_mask()
|
||||
|
||||
if(M.ears && !(HIDEEARS in obscured) && wash_obj(M.ears))
|
||||
M.update_inv_ears()
|
||||
|
||||
if(M.wear_neck && !(ITEM_SLOT_NECK in obscured) && wash_obj(M.wear_neck))
|
||||
M.update_inv_neck()
|
||||
|
||||
if(M.shoes && !(HIDESHOES in obscured) && wash_obj(M.shoes))
|
||||
M.update_inv_shoes()
|
||||
|
||||
var/washgloves = FALSE
|
||||
if(M.gloves && !(HIDEGLOVES in obscured))
|
||||
washgloves = TRUE
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.wear_suit && wash_obj(H.wear_suit))
|
||||
H.update_inv_wear_suit()
|
||||
else if(H.w_uniform && wash_obj(H.w_uniform))
|
||||
H.update_inv_w_uniform()
|
||||
|
||||
if(washgloves)
|
||||
SEND_SIGNAL(H, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
|
||||
if(!H.is_mouth_covered())
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
|
||||
if(H.belt && wash_obj(H.belt))
|
||||
H.update_inv_belt()
|
||||
else
|
||||
SEND_SIGNAL(M, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
else
|
||||
SEND_SIGNAL(L, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
|
||||
/obj/machinery/shower/proc/contamination_cleanse(atom/thing)
|
||||
var/datum/component/radioactive/healthy_green_glow = thing.GetComponent(/datum/component/radioactive)
|
||||
if(!healthy_green_glow || QDELETED(healthy_green_glow))
|
||||
return
|
||||
var/strength = healthy_green_glow.strength
|
||||
if(strength <= RAD_BACKGROUND_RADIATION)
|
||||
qdel(healthy_green_glow)
|
||||
return
|
||||
healthy_green_glow.strength -= max(0, (healthy_green_glow.strength - (RAD_BACKGROUND_RADIATION * 2)) * 0.2)
|
||||
|
||||
/obj/machinery/shower/process()
|
||||
if(on)
|
||||
wash_atom(loc)
|
||||
|
||||
@@ -144,11 +144,11 @@
|
||||
setDir(turn(dir, 90))
|
||||
|
||||
/obj/structure/sign/nanotrasen
|
||||
name = "\improper Nanotrasen Logo"
|
||||
desc = "A sign with the Nanotrasen Logo on it. Glory to Nanotrasen!"
|
||||
name = "\improper Nanotrasen logo"
|
||||
desc = "A sign with the Nanotrasen logo on it. Glory to Nanotrasen!"
|
||||
icon_state = "nanotrasen"
|
||||
|
||||
/obj/structure/sign/logo
|
||||
name = "nanotrasen logo"
|
||||
name = "\improper Nanotrasen logo"
|
||||
desc = "The Nanotrasen corporate logo."
|
||||
icon_state = "nanotrasen_sign1"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/obj/structure/statue/Initialize()
|
||||
. = ..()
|
||||
AddComponent(art_type, impressiveness)
|
||||
addtimer(CALLBACK(src, /datum.proc/AddComponent, /datum/component/beauty, impressiveness * 75), 0)
|
||||
addtimer(CALLBACK(src, /datum.proc/_AddComponent, list(/datum/component/beauty, impressiveness * 75)), 0)
|
||||
|
||||
/obj/structure/statue/attackby(obj/item/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
/obj/structure/table/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
@@ -182,8 +182,8 @@
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
AfterPutItemOnTable(I, user)
|
||||
return TRUE
|
||||
else
|
||||
@@ -552,7 +552,7 @@
|
||||
|
||||
/obj/structure/rack/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
|
||||
@@ -315,13 +315,8 @@
|
||||
|
||||
/obj/structure/windoor_assembly/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(
|
||||
/datum/component/simple_rotation,
|
||||
ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS,
|
||||
null,
|
||||
CALLBACK(src, .proc/can_be_rotated),
|
||||
CALLBACK(src,.proc/after_rotation)
|
||||
)
|
||||
var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS
|
||||
AddComponent(/datum/component/simple_rotation, rotation_flags, can_be_rotated=CALLBACK(src, .proc/can_be_rotated), after_rotation=CALLBACK(src,.proc/after_rotation))
|
||||
|
||||
/obj/structure/windoor_assembly/proc/can_be_rotated(mob/user,rotation_type)
|
||||
if(anchored)
|
||||
|
||||
Reference in New Issue
Block a user