Skip to content

Commit

Permalink
feat: add moar prefabs!
Browse files Browse the repository at this point in the history
HLD_first_aid

Also change how first aid stations are required in HLD mapgen
  • Loading branch information
kiedtl committed May 20, 2024
1 parent 19d3955 commit 087a463
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 6 deletions.
99 changes: 99 additions & 0 deletions data/prefabs/HLD_first_aid.fab
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
:g_tunneler
:g_restriction 1
:priority 100

@@p P
FIRST AID STATIONS


SEE ALARM ROOM TO REQUEST BLADEMASTER SQUAD


$g-- Zilodothrod Hubsel, Captain of the Guard$.
END POSTER

% FABEDIT_REPLACE

:tunneler_orientation north
:tunneler_orientation west

@0 m first_aid_station
@1 p steel_pillar_solid
@2 p steel_spt_e2w2
@3 p steel_spt_n1s1e2w2
@4 p titanium_bars
@5 p steel_spt_s1e1
@6 p steel_spt_n1e1
@7 p steel_pillar
@8 p steel_spt_s1e1w1
@9 p steel_spt_e1w1
@a p steel_spt_s2w1
@b p steel_spt_n2s2
@c p steel_spt_n1s1e1
@d p steel_spt_n2s2w1

589a.
4c7b.
3210.
p60..
.....

\
:tunneler_orientation south
:tunneler_orientation east
:tunneler_orientation west

@0 m first_aid_station
@1 p steel_pillar_solid
@2 p steel_spt_n2e2w2
@3 p steel_spt_e2w2
@4 p steel_spt_s1e2
@5 p steel_spt_s1w2

.....
....p
.....
01010
42325

\
:tunneler_orientation east

@0 m first_aid_station
@1 p steel_spt_s1e1
@2 p steel_spt_n1e1
@3 p steel_spt_n2w1
@4 p steel_spt_e2w2
@5 p steel_pillar_solid
@6 p steel_spt_s2w2
@7 p steel_spt_n2s2
@8 p steel_pillar
@9 p steel_spt_e1w1
@a p steel_spt_s2e1w1
@b p steel_spt_n2e1w1

.p546
.0137
...07
.02a7
.29b8

\
:tunneler_orientation west

@0 m first_aid_station
@1 p steel_pillar_solid
@2 p steel_spt_s1e1w1
@3 p steel_spt_n1e1w1
@4 p steel_spt_n1w1
@5 p steel_spt_s1w1
@6 p steel_spt_n1e1
@7 p steel_pillar
@8 p steel_spt_s1e1
@9 p steel_spt_n2s2e2w2

824..
70...
91...
70...
635p.
10 changes: 4 additions & 6 deletions src/mapgen.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4678,7 +4678,7 @@ pub fn createLevelConfig_PRI(crowd: usize, comptime prefabs: []const []const u8)
}

const HLD_BASE_LEVELCONFIG = LevelConfig{
.prefabs = &[_][]const u8{},
.prefabs = &[_][]const u8{"HLD_first_aid"},
.tunneler_opts = .{
.max_iters = 450,
.max_length = math.max(WIDTH, HEIGHT),
Expand All @@ -4693,10 +4693,8 @@ const HLD_BASE_LEVELCONFIG = LevelConfig{
.intersect_chance = 100,
.intersect_with_childless = true,
.initial_tunnelers = &[_]tunneler.TunnelerOptions.InitialTunneler{
//.{ .start = Coord.new(14, 20), .width = 0, .height = 1, .direction = .East },
.{ .start = Coord.new(WIDTH - 14, 20), .width = 1, .height = 0, .direction = .South },
//.{ .start = Coord.new(WIDTH - 13, HEIGHT - 21), .width = 0, .height = 1, .direction = .West },
.{ .start = Coord.new(14, HEIGHT - 20), .width = 1, .height = 0, .direction = .North },
.{ .start = Coord.new(WIDTH - 14, 20), .width = 2, .height = 0, .direction = .South },
.{ .start = Coord.new(14, HEIGHT - 20), .width = 2, .height = 0, .direction = .North },
},
},
.prefab_chance = 40,
Expand All @@ -4718,7 +4716,7 @@ const HLD_BASE_LEVELCONFIG = LevelConfig{
.subroom_chance = 70,
.allow_statues = false,

.machines = &[_]*const Machine{&surfaces.FirstAidStation},
.machines = &[_]*const Machine{},
};

pub fn createLevelConfig_LAB(comptime prefabs: []const []const u8) LevelConfig {
Expand Down

0 comments on commit 087a463

Please sign in to comment.