refactor(packages): 0.R5 - the rest of the lazy starts are defaults - hints' rail (sized by hints_config), lab's CRC table, rpg's crafting / items / inventory / quests / dialog, shooter's weapons, prefs, and npc's and gameplay's empty ensures gone; gameplay's faction table sits beside its state, since a default names only what is declared before it; --tighten over their tests and examples
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9e4f4edb92
commit
f516148e46
15 changed files with 73 additions and 169 deletions
|
|
@ -1,7 +1,6 @@
|
|||
# census.ludic - making one (a slot reused before a new one, a look, a name, a start on its own
|
||||
# ground out of the players' sight where that can be had), a post's fixed person, and leaving
|
||||
export function npc_spawn(npc_st: mut NpcState, kind: int) -> NpcPerson {
|
||||
np_ensure()
|
||||
if npc_st.np_n >= npc_st.np_max or kind < 0 or kind >= NPCK_COUNT { return null }
|
||||
var p: NpcPerson = null
|
||||
for i in 0 .. len(npc_st.np_walkers) {
|
||||
|
|
@ -94,7 +93,6 @@ export function npc_set_at(p: NpcPerson, x: float, z: float) -> void {
|
|||
# somebody fixed at a post (a vendor behind the counter): never walks, never counted, never leaves,
|
||||
# turns to a player within its kind's notice and back to `yaw` when they go
|
||||
export function npc_place(npc_st: mut NpcState, kind: int, x: float, z: float, yaw: float, name: string, look: int) -> NpcPerson {
|
||||
np_ensure()
|
||||
let p = new NpcPerson
|
||||
p.slot = len(npc_st.np_posts)
|
||||
np_fresh(p, kind, look)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue