refactor(packages): 0.R5 - the shop's week is rolled by its tick and asking reads it; needs start filled and vehicles start with their list; character, physics, vehicles and nativeecho's lazy starts are defaults; --tighten over all four
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
67d8079c47
commit
87259f989d
31 changed files with 104 additions and 111 deletions
|
|
@ -103,7 +103,7 @@ export state CharacterState {
|
|||
chr_eyes_now: bool = false # the last camera was the eyes: the figure is hidden
|
||||
chr_safe_x: float = 0.0
|
||||
chr_safe_z: float = 0.0
|
||||
chr_fact_q: Queue<CharacterFact> = null
|
||||
chr_fact_q: Queue<CharacterFact> = chr_fact_q__new()
|
||||
}
|
||||
function chr__top_plain(x: float, z: float, r: float, from_y: float, step: float, base: float) -> float { return base }
|
||||
function chr__bed_plain(x: float, z: float) -> float { return CharacterGround.height(x, z) }
|
||||
|
|
@ -124,3 +124,4 @@ function chr__zero() -> float { return 0.0 }
|
|||
function chr__no() -> bool { return false }
|
||||
function chr__yes() -> bool { return true }
|
||||
function chr__not_carried(ix: float, iz: float, run: bool, dt: float) -> void { }
|
||||
function chr_fact_q__new() -> Queue<CharacterFact> { return queue_new("character.facts") }
|
||||
|
|
|
|||
|
|
@ -9,12 +9,11 @@ const chr_pi: float = 3.14159265
|
|||
|
||||
|
||||
|
||||
export function char_facts(character_st: mut CharacterState) -> Queue<CharacterFact> {
|
||||
if character_st.chr_fact_q == null { character_st.chr_fact_q = queue_new("character.facts") }
|
||||
export function char_facts(character_st: CharacterState) -> Queue<CharacterFact> {
|
||||
return character_st.chr_fact_q
|
||||
}
|
||||
|
||||
function chr_say(character_st: mut CharacterState, what: int, v: float) -> void {
|
||||
function chr_say(character_st: CharacterState, what: int, v: float) -> void {
|
||||
let f = new CharacterFact
|
||||
f.what = what
|
||||
f.x = character_st.chr_x
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ program CharacterTest {
|
|||
char_release(character_st, CHAR_HOLD_SCREEN)
|
||||
char_teleport(character_st, x, z, yaw)
|
||||
}
|
||||
function facts(character_st: mut CharacterState) -> []CharacterFact { return q_drain(char_facts(character_st)) }
|
||||
function facts(character_st: CharacterState) -> []CharacterFact { return q_drain(char_facts(character_st)) }
|
||||
function count(fs: []CharacterFact, what: int) -> int {
|
||||
var n = 0
|
||||
for i in 0 .. len(fs) { if fs[i].what == what { n += 1 } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue