feat(jobs): phase 3 - a job can be given up: jobs_give_up puts a written job back on offer from the next day (the day back is saved with it, so giving up is never a reroll), jobs_post_give_up takes a post down for the morning to replace; an auto board's posts are not taken and not given up; JOBS_F_GIVEN_UP tells the game to take down what it placed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e397e4eee9
commit
2c578c6f1c
8 changed files with 170 additions and 6 deletions
|
|
@ -20,12 +20,12 @@ export function jobs_under_way(jobs_st: JobsState, i: int) -> bool {
|
|||
# on offer: not taken, the scope's standing and the story far enough, and the game allowing it
|
||||
export function jobs_offered(jobs_st: JobsState, i: int) -> bool {
|
||||
let d = Jobs[i]
|
||||
if jobs_state(jobs_st, i) != JOBS_OFFERED { return false }
|
||||
if jobs_state(jobs_st, i) != JOBS_OFFERED or JobsWorld.day() < jobs_st.jobs__back[i] { return false }
|
||||
return JobsWorld.rep(d.scope) >= d.minrep and JobsWorld.stage() >= d.minstage and JobsWorld.open(i)
|
||||
}
|
||||
|
||||
export function jobs_take(jobs_st: mut JobsState, i: int) -> bool {
|
||||
if not jobs_ok(i) or jobs_state(jobs_st, i) != JOBS_OFFERED { return false }
|
||||
if not jobs_ok(i) or jobs_state(jobs_st, i) != JOBS_OFFERED or JobsWorld.day() < jobs_st.jobs__back[i] { return false }
|
||||
jobs_st.jobs__st[i] = JOBS_ACTIVE
|
||||
jobs_st.jobs__hv[i] = 0
|
||||
jobs__recheck_one(jobs_st, i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue