Skip to content

Commit 2a9c1c8

Browse files
Zandariosilicons
andauthored
Implements Auto Icon Cutter (#7195)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Minimal version of #6313 ## Why It's Good For The Artists They beg... --------- Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
1 parent 2723bd3 commit 2a9c1c8

File tree

17 files changed

+402
-255
lines changed

17 files changed

+402
-255
lines changed

.github/workflows/ci_suite.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ jobs:
7070
key: ${{ runner.os }}-rust-${{ hashFiles('tools/ci/ci_dependencies.sh')}}
7171
restore-keys: |
7272
${{ runner.os }}-rust-
73+
- name: Restore Cutter cache
74+
uses: actions/cache@v4
75+
with:
76+
path: tools/icon_cutter/cache
77+
key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }}
7378
- name: Install Tools
7479
run: |
7580
bash tools/ci/install_node.sh
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
mode = "BitmaskSlice"
2+
3+
# Don't try and put directions in our icon states
4+
produce_dirs = false
5+
# We smooth only with our cardinal neighbors, not the ones on the diagonal
6+
smooth_diagonally = false
7+
8+
# Take as input a set of 32x32 blocks
9+
[icon_size]
10+
x = 32
11+
y = 32
12+
13+
# Output our stuff at the same level as it's input
14+
[output_icon_pos]
15+
x = 0
16+
y = 0
17+
18+
# And at the same width/height too
19+
[output_icon_size]
20+
x = 32
21+
y = 32
22+
23+
# This defines where in our list of blocks we draw each "direction" from
24+
# no connections, east/west, north/south, and north/south/east/west
25+
# the 0-3 is the block to read from, starting at 0
26+
[positions]
27+
convex = 0
28+
horizontal = 1
29+
vertical = 2
30+
concave = 3
31+
32+
# When we cut up our blockls, we're cutting "around" a central point
33+
# We typically want to cut around the center, so let's do that here
34+
[cut_pos]
35+
x = 16
36+
y = 16
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
template = "bitmask/cardinal_32x32"
2+
3+
# We're diagonal
4+
smooth_diagonally = true
5+
6+
# And because of that we need a state for all directions
7+
[positions]
8+
convex = 0
9+
vertical = 1
10+
horizontal = 2
11+
concave = 3
12+
flat = 4
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
template = "bitmask/diagonal_32x32"
2+
# output_name = "wall"
3+
4+
[cut_pos]
5+
y = 5

dependencies.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ export MARIADB_VERSION=11.8.2
2929

3030
# Flyway version
3131
export FLYWAY_VERSION=11.0.1
32+
33+
#hypnagogic repo
34+
export CUTTER_REPO=spacestation13/hypnagogic
35+
36+
#hypnagogic git tag
37+
export CUTTER_VERSION=v4.0.0

maps/submaps/lythios_rift/caves/west_caves_mines.dmm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@
118118
/area/rift/surfacebase/outside/west_caves)
119119
"x" = (
120120
/obj/structure/closet/crate/miningcar,
121-
/obj/item/grenade/explosive/ied/tyrmalin,
121+
/obj/item/grenade/simple/explosive/ied/tyrmalin,
122122
/obj/random/multiple/ores,
123-
/obj/item/grenade/explosive/ied/tyrmalin,
124-
/obj/item/grenade/explosive/ied/tyrmalin,
123+
/obj/item/grenade/simple/explosive/ied/tyrmalin,
124+
/obj/item/grenade/simple/explosive/ied/tyrmalin,
125125
/turf/simulated/mineral/floor/icerock/lythios43c/indoors/ignore_cavegen,
126126
/area/rift/surfacebase/outside/west_caves)
127127
"y" = (

tools/SS13SmoothingCutter/Cutter.dm

Lines changed: 0 additions & 226 deletions
This file was deleted.
-474 Bytes
Binary file not shown.
-253 Bytes
Binary file not shown.

tools/SS13SmoothingCutter/SS13SmoothingCutter.dme

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)