engine-c: dense scrap oil-field + latticed derrick BT_REFINERY near clash

Forward HQ REFINERY + harvesters; denser clash scrap flecks; derrick/gantry/hopper silhouette in snapshot+sprites.
This commit is contained in:
local-model/engine-L2-grok-4.5 2026-09-19 16:53:12 +02:00
parent 4c5e34510c
commit 57f95fe3a0
No known key found for this signature in database
3 changed files with 83 additions and 29 deletions

View file

@ -256,12 +256,39 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
bld_spawn(g, BT_BASE, human, hqx + 3, hqy);
bld_spawn(g, BT_POWER, human, hqx - 1, hqy + 2);
bld_spawn(g, BT_WARFACTORY, human, hqx + 1, hqy + 3);
bld_spawn(g, BT_REFINERY, human, hqx + 4, hqy + 3); /* derrick near clash crop */
bld_spawn(g, BT_TURRET, human, hqx + 2, hqy - 1);
bld_spawn(g, BT_TURRET, human, hqx + 5, hqy + 1);
bld_spawn(g, BT_WALL, human, hqx - 1, hqy);
bld_spawn(g, BT_WALL, human, hqx - 1, hqy + 1);
bld_spawn(g, BT_WALL, human, hqx + 5, hqy);
bld_force_complete(g);
/* dense scrap oil-field SE of derrick (visible in clash crop) */
for (int dy = 3; dy <= 8; dy++) {
for (int dx = 4; dx <= 11; dx++) {
int tx = hqx + dx, ty = hqy + dy;
if (!map_in_bounds(&g->map, tx, ty)) continue;
Tile *t = map_tile(&g->map, tx, ty);
if (!t || !t->walkable || t->occupied) continue;
int d2 = (dx - 7) * (dx - 7) + (dy - 5) * (dy - 5);
if (d2 > 20) continue;
t->terrain = T_SCRAP;
t->scrap = (uint8_t)(140 + ((dx * 17 + dy * 11) & 95));
}
}
/* harvesters on the scrap oil-field approach (cargo seeded) */
{
float rwx, rwy;
map_tile_to_world(hqx + 6, hqy + 5, &rwx, &rwy);
for (int hi = 0; hi < 2; hi++) {
int ui = unit_spawn(g, UT_HARVESTER, human,
rwx + (hi * 22 - 8), rwy + 6.0f);
if (ui >= 0 && ui < MAX_UNITS) {
Unit *hu = &g->units[ui];
if (hu && !hu->dead) hu->cargo = (uint16_t)(620 + hi * 9);
}
}
}
}
}
@ -282,10 +309,11 @@ static void place_showcase(Game *g, Faction human, Faction enemy) {
} else if (d2 <= 12) {
t->terrain = T_RUBBLE;
t->scrap = 0;
} else if (d2 <= 28 && ((dx + dy * 3) & 3) == 0) {
} else if (d2 <= 30 && ((dx + dy * 3) & 1) == 0) {
/* denser scrap flecks around clash (oil-field read) */
t->terrain = T_SCRAP;
t->scrap = (uint8_t)(90 + ((dx * 13 + dy * 7) & 127));
} else if (d2 <= 32 && ((dx * 5 + dy) & 2) == 0) {
t->scrap = (uint8_t)(110 + ((dx * 13 + dy * 7) & 127));
} else if (d2 <= 36 && ((dx * 5 + dy) & 2) == 0) {
t->terrain = T_RUBBLE;
t->scrap = 0;
}