Implement production vertical slice foundation
This commit is contained in:
1 parent
9d4a89f355
commit
a18e82eb44
104 files changed
+10595
-268
No files matched your search
@@ -0,0 +1,37 @@
|
||||
class_name DiveUpdate
|
||||
extends RefCounted
|
||||
|
||||
const DiveSnapshot = preload("res://game/domain/dive/dive_snapshot.gd")
|
||||
const DiveEvent = preload("res://game/domain/dive/dive_event.gd")
|
||||
|
||||
var accepted: bool
|
||||
var requested_tick_sequence: int
|
||||
var rejection_reason: String
|
||||
var snapshot: DiveSnapshot
|
||||
var events: Array[DiveEvent]
|
||||
|
||||
|
||||
func _init(
|
||||
p_accepted: bool,
|
||||
p_requested_tick_sequence: int,
|
||||
p_rejection_reason: String,
|
||||
p_snapshot: DiveSnapshot,
|
||||
p_events: Array[DiveEvent] = []
|
||||
) -> void:
|
||||
accepted = p_accepted
|
||||
requested_tick_sequence = p_requested_tick_sequence
|
||||
rejection_reason = p_rejection_reason
|
||||
snapshot = p_snapshot
|
||||
events = p_events.duplicate()
|
||||
|
||||
|
||||
static func initial(snapshot: DiveSnapshot):
|
||||
return new(true, snapshot.tick_sequence, "", snapshot)
|
||||
|
||||
|
||||
static func rejected(
|
||||
requested_tick_sequence: int,
|
||||
reason: String,
|
||||
snapshot: DiveSnapshot
|
||||
):
|
||||
return new(false, requested_tick_sequence, reason, snapshot)
|
||||
Reference in new issue
Block a user