mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Adds Drafting Chalk (#6301)
* Chalktime * Now more chalkable * Now public access. * typofix * stfu lohikar god * redundafix * arrowfix
This commit is contained in:
@@ -740,6 +740,7 @@
|
||||
#include "code\game\objects\items\bodybag.dm"
|
||||
#include "code\game\objects\items\contraband.dm"
|
||||
#include "code\game\objects\items\crayons.dm"
|
||||
#include "code\game\objects\items\draftingchalk.dm"
|
||||
#include "code\game\objects\items\eightball.dm"
|
||||
#include "code\game\objects\items\glassjar.dm"
|
||||
#include "code\game\objects\items\latexballoon.dm"
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
/obj/effect/decal/cleanable/draftingchalk
|
||||
name = "chalk marking"
|
||||
desc = "A line drawn in chalk."
|
||||
icon = 'icons/obj/smooth/chalkline-smooth.dmi'
|
||||
icon_state = "preview"
|
||||
color = "#FFFFFF"
|
||||
layer = 2.1
|
||||
anchored = TRUE
|
||||
smooth = SMOOTH_TRUE
|
||||
|
||||
/obj/effect/decal/cleanable/draftingchalk/Initialize(mapload)
|
||||
. = ..()
|
||||
if (mapload)
|
||||
queue_smooth(src)
|
||||
else
|
||||
smooth_icon(src)
|
||||
for (var/obj/effect/decal/cleanable/draftingchalk/C in orange(1, src))
|
||||
smooth_icon(C)
|
||||
|
||||
/obj/item/weapon/pen/drafting
|
||||
name = "white drafting chalk"
|
||||
desc = "A piece of white chalk for marking areas of floor."
|
||||
icon = 'icons/obj/crayons.dmi'
|
||||
icon_state = "dchalk"
|
||||
color = "#FFFFFF"
|
||||
var/colorName = "whitec"
|
||||
|
||||
/obj/item/weapon/pen/drafting/afterattack(turf/target, mob/user, proximity)
|
||||
if (!proximity || !istype(target, /turf/simulated) || target.density || target.is_hole)
|
||||
return
|
||||
|
||||
to_chat(user, "You start marking a line on [target].")
|
||||
|
||||
if (!do_after(user, 1 SECONDS, act_target = target))
|
||||
return
|
||||
|
||||
for (var/obj/effect/decal/cleanable/draftingchalk/C in target)
|
||||
qdel(C)
|
||||
|
||||
to_chat(user, "You mark a line on [target].")
|
||||
|
||||
var/obj/effect/decal/cleanable/draftingchalk/C = new(target)
|
||||
C.color = color
|
||||
target.add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/pen/drafting/red
|
||||
name = "red drafting chalk"
|
||||
desc = "A piece of red chalk for marking areas of floor."
|
||||
color = "#E75344"
|
||||
colorName = "redc"
|
||||
|
||||
/obj/effect/decal/cleanable/draftingchalk/red
|
||||
desc = "A line drawn in a red chalk."
|
||||
color = "#E75344"
|
||||
|
||||
/obj/item/weapon/pen/drafting/yellow
|
||||
name = "yellow drafting chalk"
|
||||
desc = "A piece of yellow chalk for marking areas of floor."
|
||||
color = "#E1CB47"
|
||||
colorName = "yellowc"
|
||||
|
||||
/obj/effect/decal/cleanable/draftingchalk/yellow
|
||||
desc = "A line drawn in a yellow chalk."
|
||||
color = "#E1CB47"
|
||||
|
||||
/obj/item/weapon/pen/drafting/green
|
||||
name = "green drafting chalk"
|
||||
desc = "A piece of yellow chalk for marking areas of floor."
|
||||
color = "#6CD48F"
|
||||
colorName = "green"
|
||||
|
||||
/obj/effect/decal/cleanable/draftingchalk/green
|
||||
desc = "A line drawn in a green chalk."
|
||||
color = "#6CD48F"
|
||||
|
||||
/obj/item/weapon/pen/drafting/blue
|
||||
name = "blue drafting chalk"
|
||||
desc = "A piece of blue chalk for marking areas of floor."
|
||||
color = "#9FC8F7"
|
||||
colorName = "bluec"
|
||||
|
||||
/obj/effect/decal/cleanable/draftingchalk/blue
|
||||
desc = "A line drawn in a blue chalk."
|
||||
color = "#9FC8F7"
|
||||
|
||||
/obj/item/weapon/pen/drafting/purple
|
||||
name = "purple drafting chalk"
|
||||
desc = "A piece of purple chalk for marking areas of floor."
|
||||
color = "#a489c2"
|
||||
colorName = "purplec"
|
||||
|
||||
/obj/effect/decal/cleanable/draftingchalk/purple
|
||||
desc = "A line drawn in a purple chalk."
|
||||
color = "#a489c2"
|
||||
|
||||
/obj/item/weapon/storage/fancy/crayons/chalkbox
|
||||
name = "box of drafting chalk"
|
||||
desc = "A box of drafting chalk for drafting floor plans."
|
||||
icon_state = "chalkbox"
|
||||
icon_type = "chalk"
|
||||
can_hold = list(
|
||||
/obj/item/weapon/pen/drafting
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/fancy/crayons/chalkbox/fill()
|
||||
new /obj/item/weapon/pen/drafting/red(src)
|
||||
new /obj/item/weapon/pen/drafting(src)
|
||||
new /obj/item/weapon/pen/drafting/yellow(src)
|
||||
new /obj/item/weapon/pen/drafting/green(src)
|
||||
new /obj/item/weapon/pen/drafting/blue(src)
|
||||
new /obj/item/weapon/pen/drafting/purple(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/crayons/chalkbox/update_icon()
|
||||
cut_overlays()
|
||||
for(var/obj/item/weapon/pen/drafting/chalk in contents)
|
||||
add_overlay("[chalk.colorName]")
|
||||
@@ -0,0 +1,41 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Kaedwuff
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Added drafting chalks to the game, which can be used to draft out construction plans on floor turfs. A box can be found in the engineering lobby and the secondary tool storage on the surface."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 732 B After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 810 B |
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
@@ -64905,6 +64905,11 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
|
||||
/turf/simulated/floor/plating,
|
||||
/area/maintenance/medbay)
|
||||
"elB" = (
|
||||
/obj/structure/table/wood/gamblingtable,
|
||||
/obj/item/weapon/storage/fancy/crayons/chalkbox,
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/engineering/foyer)
|
||||
"eoJ" = (
|
||||
/obj/random/plushie,
|
||||
/turf/simulated/floor/plating,
|
||||
@@ -87887,7 +87892,7 @@ aCa
|
||||
aDU
|
||||
aFJ
|
||||
aHL
|
||||
aHL
|
||||
elB
|
||||
aLb
|
||||
aMS
|
||||
aOH
|
||||
|
||||
@@ -10420,6 +10420,7 @@
|
||||
/obj/structure/table/standard,
|
||||
/obj/item/weapon/storage/fancy/crayons,
|
||||
/obj/item/weapon/storage/fancy/crayons,
|
||||
/obj/item/weapon/storage/fancy/crayons/chalkbox,
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/storage/primary)
|
||||
"sZ" = (
|
||||
@@ -15221,6 +15222,7 @@
|
||||
d2 = 8;
|
||||
icon_state = "1-8"
|
||||
},
|
||||
/obj/item/weapon/storage/fancy/crayons/chalkbox,
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/storage/tools)
|
||||
"Cb" = (
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
if(isfile(dmifile) && (copytext("[dmifile]",-4) == ".dmi"))
|
||||
SliceNDice(dmifile)
|
||||
else
|
||||
to_world("\red Bad DMI file '[dmifile]'")
|
||||
world << "\red Bad DMI file '[dmifile]'"
|
||||
|
||||
|
||||
/proc/SliceNDice(dmifile as file)
|
||||
var/icon/sourceIcon = icon(dmifile)
|
||||
var/list/states = sourceIcon.IconStates()
|
||||
to_world("<B>[dmifile] - states: [states.len]</B>")
|
||||
world << "<B>[dmifile] - states: [states.len]</B>"
|
||||
|
||||
switch(states.len)
|
||||
if(0 to (STATE_COUNT_NORMAL - 1))
|
||||
@@ -23,9 +23,9 @@
|
||||
if(cont == "No")
|
||||
return
|
||||
if(STATE_COUNT_NORMAL)
|
||||
to_world("4 States, running in Non-Diagonal mode")
|
||||
world << "4 States, running in Non-Diagonal mode"
|
||||
if(STATE_COUNT_DIAGONAL)
|
||||
to_world("5 States, running in Diagonal mode")
|
||||
world << "5 States, running in Diagonal mode"
|
||||
if((STATE_COUNT_DIAGONAL + 1) to A_BIG_NUMBER)
|
||||
var/cont = alert(usr, "Too many states: [states.len], expected [STATE_COUNT_NORMAL] (Non-Diagonal) or [STATE_COUNT_DIAGONAL] (Diagonal), Continue?", "Unexpected Amount of States", "Yes", "No")
|
||||
if(cont == "No")
|
||||
@@ -65,7 +65,7 @@
|
||||
corner4i.DrawBox(null, 17, 17, 32, 32)
|
||||
outputIcon.Insert(corner4i, "4-i")
|
||||
|
||||
to_world("Box: \icon[box] -> \icon[corner1i] \icon[corner2i] \icon[corner3i] \icon[corner4i]")
|
||||
world << "Box: \icon[box] -> \icon[corner1i] \icon[corner2i] \icon[corner3i] \icon[corner4i]"
|
||||
|
||||
if("line")
|
||||
var/icon/line = icon(sourceIcon, state)
|
||||
@@ -108,7 +108,7 @@
|
||||
line4e.Turn(90)
|
||||
outputIcon.Insert(line4e, "4-e")
|
||||
|
||||
to_world("Line: \icon[line] -> \icon[line1n] \icon[line2n] \icon[line3s] \icon[line4s] \icon[line1w] \icon[line2e] \icon[line3w] \icon[line4e]")
|
||||
world << "Line: \icon[line] -> \icon[line1n] \icon[line2n] \icon[line3s] \icon[line4s] \icon[line1w] \icon[line2e] \icon[line3w] \icon[line4e]"
|
||||
|
||||
if("center_4")
|
||||
var/icon/center4 = icon(sourceIcon, state)
|
||||
@@ -133,7 +133,7 @@
|
||||
corner4se.DrawBox(null, 17, 17, 32, 32)
|
||||
outputIcon.Insert(corner4se, "4-se")
|
||||
|
||||
to_world("Center4: \icon[center4] -> \icon[corner1nw] \icon[corner2ne] \icon[corner3sw] \icon[corner4se]")
|
||||
world << "Center4: \icon[center4] -> \icon[corner1nw] \icon[corner2ne] \icon[corner3sw] \icon[corner4se]"
|
||||
|
||||
if("center_8")
|
||||
var/icon/center8 = icon(sourceIcon, state)
|
||||
@@ -158,7 +158,7 @@
|
||||
corner4f.DrawBox(null, 17, 17, 32, 32)
|
||||
outputIcon.Insert(corner4f, "4-f")
|
||||
|
||||
to_world("Center8: \icon[center8] -> \icon[corner1f] \icon[corner2f] \icon[corner3f] \icon[corner4f]")
|
||||
world << "Center8: \icon[center8] -> \icon[corner1f] \icon[corner2f] \icon[corner3f] \icon[corner4f]"
|
||||
|
||||
if("diag")
|
||||
var/icon/diag = icon(sourceIcon, state)
|
||||
@@ -178,7 +178,7 @@
|
||||
diagnw.Turn(180)
|
||||
outputIcon.Insert(diagnw, "d-nw")
|
||||
|
||||
to_world("Diag: \icon[diag] -> \icon[diagse] \icon[diagsw] \icon[diagne] \icon[diagnw]")
|
||||
world << "Diag: \icon[diag] -> \icon[diagse] \icon[diagsw] \icon[diagne] \icon[diagnw]"
|
||||
|
||||
if("diag_corner_a")
|
||||
var/icon/diag_corner_a = icon(sourceIcon, state)
|
||||
@@ -198,7 +198,7 @@
|
||||
diagnw0.Turn(180)
|
||||
outputIcon.Insert(diagnw0, "d-nw-0")
|
||||
|
||||
to_world("Diag_Corner_A: \icon[diag_corner_a] -> \icon[diagse0] \icon[diagsw0] \icon[diagne0] \icon[diagnw0]")
|
||||
world << "Diag_Corner_A: \icon[diag_corner_a] -> \icon[diagse0] \icon[diagsw0] \icon[diagne0] \icon[diagnw0]"
|
||||
|
||||
if("diag_corner_b")
|
||||
var/icon/diag_corner_b = icon(sourceIcon, state)
|
||||
@@ -218,9 +218,9 @@
|
||||
diagnw1.Turn(180)
|
||||
outputIcon.Insert(diagnw1, "d-nw-0")
|
||||
|
||||
to_world("Diag_Corner_B: \icon[diag_corner_b] -> \icon[diagse1] \icon[diagsw1] \icon[diagne1] \icon[diagnw1]")
|
||||
world << "Diag_Corner_B: \icon[diag_corner_b] -> \icon[diagse1] \icon[diagsw1] \icon[diagne1] \icon[diagnw1]"
|
||||
|
||||
|
||||
|
||||
fcopy(outputIcon, filename) //Update output icon each iteration
|
||||
to_world("Finished [filename]!")
|
||||
world << "Finished [filename]!"
|
||||
|
||||
Reference in New Issue
Block a user