diff options
Diffstat (limited to 'apworld/client/manager.gd')
-rw-r--r-- | apworld/client/manager.gd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/apworld/client/manager.gd b/apworld/client/manager.gd index 0d5a5aa..4f5018f 100644 --- a/apworld/client/manager.gd +++ b/apworld/client/manager.gd | |||
@@ -237,6 +237,9 @@ func _process_item(item, amount): | |||
237 | if player != null: | 237 | if player != null: |
238 | player.evaluate_solvability.emit() | 238 | player.evaluate_solvability.emit() |
239 | 239 | ||
240 | if item_id == gamedata.objects.get_special_ids()["A Job Well Done"]: | ||
241 | update_job_well_done_sign() | ||
242 | |||
240 | # Show a message about the item if it's new. | 243 | # Show a message about the item if it's new. |
241 | if int(item["index"]) > _last_new_item: | 244 | if int(item["index"]) > _last_new_item: |
242 | _last_new_item = int(item["index"]) | 245 | _last_new_item = int(item["index"]) |
@@ -503,6 +506,9 @@ func start_batching_locations(): | |||
503 | 506 | ||
504 | 507 | ||
505 | func send_location(loc_id): | 508 | func send_location(loc_id): |
509 | if client._checked_locations.has(loc_id): | ||
510 | return | ||
511 | |||
506 | if _batch_locations: | 512 | if _batch_locations: |
507 | _held_locations.append(loc_id) | 513 | _held_locations.append(loc_id) |
508 | else: | 514 | else: |
@@ -601,3 +607,29 @@ func _process_key_item(key, level): | |||
601 | level += 1 | 607 | level += 1 |
602 | 608 | ||
603 | keyboard.collect_remote_letter(key, level) | 609 | keyboard.collect_remote_letter(key, level) |
610 | |||
611 | |||
612 | func update_job_well_done_sign(): | ||
613 | if global.map != "daedalus": | ||
614 | return | ||
615 | |||
616 | var gamedata = global.get_node("Gamedata") | ||
617 | var job_item = gamedata.objects.get_special_ids()["A Job Well Done"] | ||
618 | var jobs_done = client.getItemAmount(job_item) | ||
619 | |||
620 | var sign2 = get_tree().get_root().get_node_or_null("scene/Meshes/Miscellaneous/sign2") | ||
621 | var sign3 = get_tree().get_root().get_node_or_null("scene/Meshes/Miscellaneous/sign3") | ||
622 | |||
623 | if sign2 != null and sign3 != null: | ||
624 | if jobs_done == 0: | ||
625 | sign2.text = "what are you doing" | ||
626 | sign3.text = "?" | ||
627 | elif jobs_done == 1: | ||
628 | sign2.text = "a job well done" | ||
629 | sign3.text = "is its own reward" | ||
630 | else: | ||
631 | sign2.text = "%d jobs well done" % jobs_done | ||
632 | sign3.text = "are their own reward" | ||
633 | |||
634 | sign2.get_node("MeshInstance3D").mesh.text = sign2.text | ||
635 | sign3.get_node("MeshInstance3D").mesh.text = sign3.text | ||