mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 06:00:23 +01:00
Merge remote-tracking branch 'upstream/master' into kk-talon
This commit is contained in:
@@ -112,7 +112,7 @@
|
||||
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
|
||||
@@ -215,7 +215,7 @@
|
||||
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?")
|
||||
var/new_name = stripped_input(user,"What do you want to name the painting?", max_length = 250)
|
||||
if(new_name != painting_name && new_name && CanUseTopic(user, GLOB.tgui_physical_state))
|
||||
painting_name = new_name
|
||||
SStgui.update_uis(src)
|
||||
@@ -291,7 +291,7 @@
|
||||
if(new_color)
|
||||
selected_color = new_color
|
||||
color_drop.color = new_color
|
||||
|
||||
|
||||
cut_overlays()
|
||||
if(hud_level)
|
||||
add_overlay(color_drop)
|
||||
@@ -316,21 +316,10 @@
|
||||
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
|
||||
refund_amt = 5
|
||||
refund_type = /obj/item/stack/material/wood
|
||||
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)
|
||||
build_machine_type = /obj/structure/sign/painting
|
||||
|
||||
/obj/structure/sign/painting
|
||||
name = "Painting"
|
||||
@@ -483,12 +472,12 @@
|
||||
/obj/structure/sign/painting/proc/load_persistent()
|
||||
if(!persistence_id || !LAZYLEN(SSpersistence.unpicked_paintings))
|
||||
return
|
||||
|
||||
|
||||
var/list/painting_category = list()
|
||||
for (var/list/P in SSpersistence.unpicked_paintings)
|
||||
if(P["persistence_id"] == persistence_id)
|
||||
painting_category[++painting_category.len] = P
|
||||
|
||||
|
||||
var/list/painting
|
||||
while(!painting)
|
||||
if(!length(painting_category))
|
||||
@@ -500,7 +489,7 @@
|
||||
continue //and try again
|
||||
painting = chosen
|
||||
SSpersistence.unpicked_paintings -= list(chosen)
|
||||
|
||||
|
||||
var/title = painting["title"]
|
||||
var/author_name = painting["author"]
|
||||
var/author_ckey = painting["ckey"]
|
||||
@@ -509,7 +498,7 @@
|
||||
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)
|
||||
@@ -519,7 +508,7 @@
|
||||
if(!new_canvas)
|
||||
warning("Couldn't find a canvas to match [w]x[h] of painting")
|
||||
return
|
||||
|
||||
|
||||
new_canvas.fill_grid_from_icon(I)
|
||||
new_canvas.generated_icon = I
|
||||
new_canvas.icon_generated = TRUE
|
||||
@@ -540,7 +529,7 @@
|
||||
return
|
||||
if(!current_canvas.painting_name)
|
||||
current_canvas.painting_name = "Untitled Artwork"
|
||||
|
||||
|
||||
var/data = current_canvas.get_data_string()
|
||||
var/md5 = md5(lowertext(data))
|
||||
for(var/list/entry in SSpersistence.all_paintings)
|
||||
@@ -549,10 +538,10 @@
|
||||
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.all_paintings += list(list(
|
||||
"persistence_id" = persistence_id,
|
||||
"title" = current_canvas.painting_name,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
starts_with = list(
|
||||
/obj/item/weapon/storage/bag/plants,
|
||||
/obj/item/clothing/under/rank/hydroponics,
|
||||
/obj/item/clothing/gloves/botanic_leather,
|
||||
/obj/item/device/analyzer/plant_analyzer,
|
||||
/obj/item/device/radio/headset/headset_service,
|
||||
/obj/item/clothing/head/greenbandana,
|
||||
|
||||
@@ -450,6 +450,43 @@
|
||||
desc = "This is a tiny well lit decorative christmas tree."
|
||||
icon_state = "plant-xmas"
|
||||
|
||||
/obj/random/pottedplant
|
||||
name = "random potted plant"
|
||||
desc = "This is a random potted plant."
|
||||
|
||||
/obj/random/pottedplant/item_to_spawn()
|
||||
return pick(
|
||||
prob(10);/obj/structure/flora/pottedplant,
|
||||
prob(10);/obj/structure/flora/pottedplant/large,
|
||||
prob(10);/obj/structure/flora/pottedplant/fern,
|
||||
prob(10);/obj/structure/flora/pottedplant/overgrown,
|
||||
prob(10);/obj/structure/flora/pottedplant/bamboo,
|
||||
prob(10);/obj/structure/flora/pottedplant/largebush,
|
||||
prob(10);/obj/structure/flora/pottedplant/thinbush,
|
||||
prob(10);/obj/structure/flora/pottedplant/mysterious,
|
||||
prob(10);/obj/structure/flora/pottedplant/smalltree,
|
||||
prob(10);/obj/structure/flora/pottedplant/unusual,
|
||||
prob(10);/obj/structure/flora/pottedplant/orientaltree,
|
||||
prob(10);/obj/structure/flora/pottedplant/smallcactus,
|
||||
prob(10);/obj/structure/flora/pottedplant/tall,
|
||||
prob(10);/obj/structure/flora/pottedplant/sticky,
|
||||
prob(10);/obj/structure/flora/pottedplant/smelly,
|
||||
prob(10);/obj/structure/flora/pottedplant/small,
|
||||
prob(10);/obj/structure/flora/pottedplant/aquatic,
|
||||
prob(10);/obj/structure/flora/pottedplant/shoot,
|
||||
prob(10);/obj/structure/flora/pottedplant/flower,
|
||||
prob(10);/obj/structure/flora/pottedplant/crystal,
|
||||
prob(10);/obj/structure/flora/pottedplant/subterranean,
|
||||
prob(10);/obj/structure/flora/pottedplant/minitree,
|
||||
prob(10);/obj/structure/flora/pottedplant/stoutbush,
|
||||
prob(10);/obj/structure/flora/pottedplant/drooping,
|
||||
prob(10);/obj/structure/flora/pottedplant/tropical,
|
||||
prob(10);/obj/structure/flora/pottedplant/dead,
|
||||
prob(10);/obj/structure/flora/pottedplant/decorative,
|
||||
prob(1);/obj/structure/flora/pottedplant/xmas
|
||||
)
|
||||
|
||||
|
||||
/obj/structure/flora/sif
|
||||
icon = 'icons/obj/flora/sifflora.dmi'
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/simple_door/AltClick(mob/user as mob)
|
||||
. = ..()
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
@@ -78,7 +79,7 @@
|
||||
src.visible_message("<span class='warning'>[user] hammers on \the [src]!</span>", "<span class='warning'>Someone hammers loudly on \the [src]!</span>")
|
||||
src.add_fingerprint(user)
|
||||
playsound(src, knock_hammer_sound, 50, 0, 3)
|
||||
else
|
||||
else if(user.a_intent == I_HELP)
|
||||
src.visible_message("[user] knocks on \the [src].", "Someone knocks on \the [src].")
|
||||
src.add_fingerprint(user)
|
||||
playsound(src, knock_sound, 50, 0, 3)
|
||||
|
||||
@@ -69,13 +69,13 @@
|
||||
var/mob/living/L = user
|
||||
//They're in it, and want to get out.
|
||||
if(L.loc == src)
|
||||
var/choice = tgui_alert(usr, "Do you want to exit \the [src]?","Un-Hide?",list("Exit","Stay"))
|
||||
var/choice = tgui_alert(user, "Do you want to exit \the [src]?","Un-Hide?",list("Exit","Stay"))
|
||||
if(choice == "Exit")
|
||||
if(L == hider)
|
||||
hider = null
|
||||
L.forceMove(get_turf(src))
|
||||
else if(!hider)
|
||||
var/choice = tgui_alert(usr, "Do you want to hide in \the [src]?","Un-Hide?",list("Hide","Stay"))
|
||||
var/choice = tgui_alert(user, "Do you want to hide in \the [src]?","Un-Hide?",list("Hide","Stay"))
|
||||
if(choice == "Hide" && !hider) //Check again because PROMPT
|
||||
L.forceMove(src)
|
||||
hider = L
|
||||
@@ -255,7 +255,8 @@
|
||||
prob(1);/obj/item/weapon/storage/box/survival/space,
|
||||
prob(1);/obj/item/weapon/storage/secure/briefcase/trashmoney,
|
||||
prob(1);/obj/item/device/survivalcapsule/popcabin,
|
||||
prob(1);/obj/item/weapon/reagent_containers/syringe/steroid)
|
||||
prob(1);/obj/item/weapon/reagent_containers/syringe/steroid,
|
||||
prob(1);/obj/item/capture_crystal)
|
||||
|
||||
var/obj/item/I = new path()
|
||||
return I
|
||||
|
||||
Reference in New Issue
Block a user