This commit is contained in:
izac112
2021-07-06 09:10:52 +02:00
182 changed files with 869 additions and 542 deletions
+68 -1
View File
@@ -101,6 +101,18 @@
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
@@ -183,7 +195,10 @@
/obj/item/canvas/proc/get_paint_tool_color(obj/item/I)
if(!I)
return
if(istype(I, /obj/item/weapon/pen/crayon))
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))
@@ -245,6 +260,58 @@
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."
+1 -1
View File
@@ -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))
+5 -4
View File
@@ -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())
+1 -1
View File
@@ -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)
@@ -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
+3 -3
View File
@@ -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>"))
+1 -1
View File
@@ -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( \
+1 -1
View File
@@ -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()
+2 -2
View File
@@ -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)