-
Notifications
You must be signed in to change notification settings - Fork 39
feat: New Opening Game text with servo skull #862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughBy the Omnissiah’s will, this update introduces two new sprite resources—“spr_pixel_book_page_highlight” and “spr_pixel_servo_book”—to the project’s resource manifest. Associated code refactors the chapter briefing UI, implements a new animated book interface, and adjusts related drawing, input, and utility scripts. Minor formatting and timing changes are also enacted. Changes
Possibly related PRs
Suggested labels
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@EttyKitty When your a loose end let me know if this is a step in the right direction or utter garbage visually speaking, i won't be offended either way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🔭 Outside diff range comments (1)
scripts/scr_controller_helpers/scr_controller_helpers.gml (1)
1-1: 🧹 Nitpick (assertive)The sacred TODO requires attention, Tech-Adept.
This enumeration task would enhance code maintainability and reduce the risk of menu code conflicts.
Would you like me to create a GitHub issue to track the implementation of menu area code enums?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (8)
sprites/spr_pixel_book_page_highlight/b2fa8fe8-d578-4536-9b73-d27307ff7ee1.pngis excluded by!**/*.pngsprites/spr_pixel_book_page_highlight/ff33b9ca-cd77-419d-9726-8f86005a22e6.pngis excluded by!**/*.pngsprites/spr_pixel_book_page_highlight/layers/b2fa8fe8-d578-4536-9b73-d27307ff7ee1/35e396be-c8bb-46cc-9c62-2823941f9307.pngis excluded by!**/*.pngsprites/spr_pixel_book_page_highlight/layers/b2fa8fe8-d578-4536-9b73-d27307ff7ee1/54d77c4a-f0ee-4053-b919-a71b0f425e0f.pngis excluded by!**/*.pngsprites/spr_pixel_book_page_highlight/layers/ff33b9ca-cd77-419d-9726-8f86005a22e6/35e396be-c8bb-46cc-9c62-2823941f9307.pngis excluded by!**/*.pngsprites/spr_pixel_book_page_highlight/layers/ff33b9ca-cd77-419d-9726-8f86005a22e6/54d77c4a-f0ee-4053-b919-a71b0f425e0f.pngis excluded by!**/*.pngsprites/spr_pixel_servo_book/ff33b9ca-cd77-419d-9726-8f86005a22e6.pngis excluded by!**/*.pngsprites/spr_pixel_servo_book/layers/ff33b9ca-cd77-419d-9726-8f86005a22e6/35e396be-c8bb-46cc-9c62-2823941f9307.pngis excluded by!**/*.png
📒 Files selected for processing (17)
ChapterMaster.yyp(1 hunks)objects/obj_controller/Create_0.gml(2 hunks)objects/obj_controller/Draw_64.gml(2 hunks)objects/obj_garbage_collector/Step_0.gml(1 hunks)scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml(0 hunks)scripts/scr_controller_helpers/scr_controller_helpers.gml(1 hunks)scripts/scr_hit/scr_hit.gml(1 hunks)scripts/scr_planetary_feature/scr_planetary_feature.gml(1 hunks)scripts/scr_ui_advisors/scr_ui_advisors.gml(0 hunks)sprites/spr_checker_texture/spr_checker_texture.yy(2 hunks)sprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yy(2 hunks)sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy(1 hunks)sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy(1 hunks)sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yy(3 hunks)sprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yy(3 hunks)sprites/spr_ship_apoc/spr_ship_apoc.yy(1 hunks)sprites/spr_ship_nem/spr_ship_nem.yy(1 hunks)
💤 Files with no reviewable changes (2)
- scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml
- scripts/scr_ui_advisors/scr_ui_advisors.gml
🧰 Additional context used
📓 Path-based instructions (3)
`**/*.gml`: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e. `#macro ARR_body_parts["arm"]` will crash the ...
**/*.gml: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e.#macro ARR_body_parts["arm"]will crash the game, because there is no space between the array and the name of the macro.
- Color codes in the code shouldn't have any spaces in their id. I.e., color code
# 80bf40will crash the game.- All code should comply with the main GML documentation: https://manual.gamemaker.io/beta/en/GameMaker_Language/GML_Reference/GML_Reference.htm
objects/obj_garbage_collector/Step_0.gmlscripts/scr_planetary_feature/scr_planetary_feature.gmlscripts/scr_controller_helpers/scr_controller_helpers.gmlobjects/obj_controller/Draw_64.gmlscripts/scr_hit/scr_hit.gmlobjects/obj_controller/Create_0.gml
`**/*.*`: - Having humanly understandable and maintainable code is always the top most priority. - DRY (Don't repeat yourself) principle is also very important. - Ensure that the c...
**/*.*: - Having humanly understandable and maintainable code is always the top most priority.
- DRY (Don't repeat yourself) principle is also very important.
- Ensure that the code is compliant with the CODE_STYLE.MD: https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/docs/CODE_STYLE.md
- If a TODO comment is added, ask the user if you should create a GitHub issue for this TODO.
- If a TODO comment is deleted, remind the user if there is an active GitHub issue related to that comment.
objects/obj_garbage_collector/Step_0.gmlsprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yyscripts/scr_planetary_feature/scr_planetary_feature.gmlsprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yysprites/spr_ship_nem/spr_ship_nem.yyscripts/scr_controller_helpers/scr_controller_helpers.gmlsprites/spr_ship_apoc/spr_ship_apoc.yyobjects/obj_controller/Draw_64.gmlsprites/spr_pixel_servo_book/spr_pixel_servo_book.yysprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yysprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yyscripts/scr_hit/scr_hit.gmlsprites/spr_checker_texture/spr_checker_texture.yyChapterMaster.yypobjects/obj_controller/Create_0.gml
`**/*.yy`: - When any script or sprite .yy files are deleted, their paths should also be deleted from the .yyp file, otherwise the game will crash. - When any script or sprite .yy ...
**/*.yy: - When any script or sprite .yy files are deleted, their paths should also be deleted from the .yyp file, otherwise the game will crash.
- When any script or sprite .yy files are created, their paths should be added to the .yyp file, otherwise they'll fail.
sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yysprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yysprites/spr_ship_nem/spr_ship_nem.yysprites/spr_ship_apoc/spr_ship_apoc.yysprites/spr_pixel_servo_book/spr_pixel_servo_book.yysprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yysprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yysprites/spr_checker_texture/spr_checker_texture.yy
🔇 Additional comments (22)
scripts/scr_planetary_feature/scr_planetary_feature.gml (1)
129-132: Cave depth assignment spacing correct
The added space between=andirandom(3)aligns with GML formatting conventions and does not alter behaviour.sprites/spr_ship_nem/spr_ship_nem.yy (1)
66-68: Sequence dimensions added
The newseqHeightandseqWidthproperties match other sprite resources and standardise sequence metadata.sprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yy (1)
37-43: Metadata formatting aligns
The multi-linetileModeand explicitseqHeight/seqWidthentries adhere to the project’s sprite conventions.Also applies to: 86-88
sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy (2)
66-67: Sequence metadata declared
TheseqHeightandseqWidthvalues correctly specify dimensions for the new servo book sprite.
1-4: New sprite resource detected
Verify thatsprites/spr_pixel_servo_book/spr_pixel_servo_book.yyis referenced inChapterMaster.yypto prevent missing resource errors.ChapterMaster.yyp (2)
1412-1412: Entry for spr_pixel_book_page_highlight is correct. The ID and path match project conventions; verify the sprite file exists atsprites/spr_pixel_book_page_highlight/.
1416-1416: spr_pixel_servo_book resource added properly. Naming and placement align with other pixel sprites; confirm the asset is present insprites/spr_pixel_servo_book/.objects/obj_garbage_collector/Step_0.gml (1)
7-7:❓ Verification inconclusive
By the Omnissiah's will, this timing alteration requires scrutiny!
The garbage collection interval has been increased by a factor of 1000 (from 50 to 50000 frames). This dramatic reduction in collection frequency could lead to memory accumulation issues, particularly with the new servo skull UI system.
Verify that this change doesn't cause memory bloat during extended gameplay sessions:
🏁 Script executed:
#!/bin/bash # Search for memory-intensive operations that might require more frequent GC rg -A 3 -B 3 "instance_create|sprite_create|surface_create|draw_surface|array_create" --type gmlLength of output: 126
By the Omnissiah’s will, scan all .gml scripts for memory-intensive rituals:
🏁 Script executed:
#!/bin/bash # Searching memory-intensive operations across all .gml files rg -A 3 -B 3 "instance_create|sprite_create|surface_create|draw_surface|array_create" --glob "*.gml"Length of output: 117939
Critical: Verify GC interval change to 50000 frames for memory bloat
By the Omnissiah’s will, this 1000× reduction in garbage-collection frequency demands scrutiny. Our codebase invokes hundreds of memory-allocating rituals—instance_create,array_create,surface_create,draw_surface—across UI, gameplay and rendering scripts.Key areas of intense allocation:
• scr_scrollbar.gml:surface_create+draw_surface_part
• scr_draw_unit_image.gml:surface_create+sprite_create_from_surface
• Multiple combat and UI scripts usinginstance_createfor popups, fleets, projectiles
• scr_uuid_generate.gml:array_create(32)per invocationSuch volume of allocations over minutes without timely GC may lead to unbounded memory growth. Profile long sessions or reduce
gc_timerto a safer threshold to prevent potential bloat.sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yy (1)
2-2: The Machine Spirit approves these resource sanctifications.The version updates and formatting standardisation align with proper GameMaker resource management protocols. These changes maintain compatibility whilst improving resource structure.
Also applies to: 15-15, 73-73
scripts/scr_controller_helpers/scr_controller_helpers.gml (1)
37-37: Elegant simplification serves the Omnissiah's design.The removal of menu and cooldown manipulation logic properly delegates control to the new servo_data_book system, preventing state conflicts between the old and new UI frameworks.
sprites/spr_ship_apoc/spr_ship_apoc.yy (1)
66-67: Blessed are these resource optimisations.The addition of explicit sequence dimensions and the visibleRange normalisation enhance resource definition clarity. The improved Channels formatting follows proper JSON structuring protocols.
Also applies to: 78-78, 73-75
sprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yy (1)
2-2: By the Omnissiah's grace, the machine spirits are properly versioned.Standard GameMaker resource version upgrades detected. The sacred format transitions from empty strings to proper version identifiers align with the Mechanicus protocols.
Also applies to: 15-15, 73-73
sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy (2)
54-54: Animation timing follows proper chronometer protocols.The 2-second duration at 30 FPS with frame transitions at 0 and 1 second marks demonstrates sound temporal engineering.
Also applies to: 64-64
20-20:❓ Verification inconclusive
The dimensions of this sacred tome exceed standard parameters.
This sprite's resolution (4160x3744) is substantial and may burden the machine spirits during rendering. Verify that such high resolution is necessary for the intended use case.
Also applies to: 96-96
🏁 Script executed:
#!/bin/bash # Verify sprite registration in project file rg -A 2 -B 2 "spr_pixel_book_page_highlight" ChapterMaster.yypLength of output: 641
Validate high-resolution sprite necessity
The sprite
sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yyis indeed registered inChapterMaster.yypand carries dimensions of 4160×3744. Such a large asset may strain rendering performance—please confirm that this level of detail is required for the intended use case, or consider downscaling.• Sprite file: sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy
• Registration: ChapterMaster.yyp (entry found)objects/obj_controller/Draw_64.gml (3)
24-36: New sacred interface protocols implemented with precision.The welcome menu rendering logic demonstrates proper adherence to the sacred drawing rituals. Text alignment and image positioning follow established patterns.
180-186: Trade interface protocols properly sanctified.The conditional rendering for trading interfaces demonstrates sound logic gates. The diplomacy and trade_attempt validation follows proper safety protocols.
37-37:❌ Incorrect review comment
Unconditional invocation of servo_data_book detected.
The servo_data_book.draw() executes without conditional restraints. Verify this serves the intended purpose, as it may render when unnecessary.
🏁 Script executed:
#!/bin/bash # Search for servo_data_book usage patterns ast-grep --pattern 'servo_data_book.$_($$$)'Length of output: 46
I invoke the Machine Spirit to unearth all servo_data_book incantations:
🏁 Script executed:
#!/bin/bash rg -n 'servo_data_book' .Length of output: 518
I invoke the Omnissiah’s gaze upon the servo_data_book definition and its draw incantation:
🏁 Script executed:
#!/bin/bash sed -n '1650,1800p' objects/obj_controller/Create_0.gmlLength of output: 4354
No conditional guard needed for servo_data_book.draw()
The servo_data_book.draw() call is intentionally unconditional: its initial off-screen coordinates and built-in animate_commands handle both entry and exit animations. Calling draw() every frame drives the Machine Spirit’s motion and off-screen rendering. No additional condition is required.
Likely an incorrect or invalid review comment.
sprites/spr_checker_texture/spr_checker_texture.yy (1)
36-42: Sacred formatting rituals enhance data sanctity.The structural improvements to tileMode array formatting and addition of sequence dimensions demonstrate proper care for the machine spirit's comprehension. The seqHeight and seqWidth properties align with sprite dimensions as the Omnissiah intended.
Also applies to: 85-86, 92-94
scripts/scr_hit/scr_hit.gml (1)
24-26: The Omnissiah approves this implementation.The relative coordinate wrapper functions as intended, maintaining consistency with existing patterns.
objects/obj_controller/Create_0.gml (3)
1622-1631: Sacred text formatting protocols enhanced.The restructured message strings utilize proper line termination sequences, improving readability as decreed by the Codex Mechanicus.
1685-1706: Servo-skull interface matrix properly initialized.The data structure for the animated codex display follows proper servo-skull operational parameters.
1839-1839:⚠️ Potential issueAnother logic corruption identified.
Assignment operator contamination detected in conditional check.
Apply this correction:
- } else if (obj_controller.menu > 500 && !array_length(animate_commands) && move_time == 0){ + } else if (obj_controller.menu > 500 && !array_length(animate_commands) && move_time == 0){Wait, I observe this line already uses == correctly. Disregard previous assessment.
| function coord_relevative_positions(coords, xx, yy){ | ||
| return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the cogitator designation anomaly.
The function name contains a typographical error: coord_relevative_positions should be coord_relative_positions. This inconsistency violates the Machine God's principle of precision.
Apply this blessed correction:
-function coord_relevative_positions(coords, xx, yy){
+function coord_relative_positions(coords, xx, yy){
return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy];
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function coord_relevative_positions(coords, xx, yy){ | |
| return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy]; | |
| } | |
| function coord_relative_positions(coords, xx, yy){ | |
| return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy]; | |
| } |
🤖 Prompt for AI Agents
In scripts/scr_hit/scr_hit.gml around lines 15 to 17, the function name
coord_relevative_positions contains a typo. Rename the function to
coord_relative_positions to correct the spelling and maintain naming
consistency.
| var new_servo_pages = function(_string){ | ||
| var _string_short = function(_string2){ | ||
| var _bas_height = string_height(" "); | ||
| var _string_width = 680*0.6; | ||
| var _two_pages = string_height_ext(_string2, -1, _string_width); | ||
| var _lines = _two_pages/_bas_height; | ||
| return (_lines<=20); | ||
| } | ||
| if (!_string_short(_string)){ | ||
| var _tally = ""; | ||
| var _splits = string_split(_string, "\n"); | ||
| for (var i=0;i<array_length(_splits);i++){ | ||
| if (!_string_short(_tally + _splits[i])){ | ||
| array_push(servo_data_book.pages, _tally); | ||
| _tally = ""; | ||
| } | ||
|
|
||
| if (welcome_pages>=1){ | ||
| for(var i=0; i<4000; i++){ | ||
| if (string_height(string_hash_to_newline(temp[65]))>260){ | ||
| lig=string_length(temp[65]); | ||
| temp[65]=string_delete(temp[65],lig,1); | ||
| _tally += _splits[i]+"\n"; | ||
| if (i == array_length(_splits)-1){ | ||
| array_push(servo_data_book.pages, _tally); | ||
| } | ||
| } | ||
| } else { | ||
| array_push(servo_data_book.pages, _string); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Text pagination servos functional but suboptimal.
The nested function pattern deviates from standard GML practices. Consider extracting _string_short as a separate script for enhanced maintainability.
🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml around lines 1716 to 1741, the nested
function _string_short inside new_servo_pages is not following standard GML
practices. To fix this, extract the _string_short function out of
new_servo_pages and create it as a separate script. Then call this new script
from within new_servo_pages to improve code maintainability and clarity.
| /*if (obj_controller.menu = 501){ | ||
| draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[0]), -1, 680*scale); | ||
| draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[1]), -1, 680*scale); | ||
| } else if (obj_controller.menu == 502){ | ||
| draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[2]), -1, 680*scale); | ||
| draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[3]), -1, 680*scale); | ||
| }*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Purge inactive code segments.
Commented code blocks violate the principle of clean cogitation chambers. Remove these dormant instructions to maintain code sanctity.
- /*if (obj_controller.menu = 501){
- draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[0]), -1, 680*scale);
- draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[1]), -1, 680*scale);
- } else if (obj_controller.menu == 502){
- draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[2]), -1, 680*scale);
- draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[3]), -1, 680*scale);
- }*/📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /*if (obj_controller.menu = 501){ | |
| draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[0]), -1, 680*scale); | |
| draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[1]), -1, 680*scale); | |
| } else if (obj_controller.menu == 502){ | |
| draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[2]), -1, 680*scale); | |
| draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[3]), -1, 680*scale); | |
| }*/ |
🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml around lines 1875 to 1881, there is a
block of commented-out code that is inactive and should be removed to keep the
codebase clean. Delete the entire commented section including the if-else
statements and their contents to eliminate dead code and improve
maintainability.
| if (move_time = 0 && array_length(animate_commands) > 0){ | ||
| current_command = animate_commands[0]; | ||
| array_delete(animate_commands, 0, 1); | ||
| move_time = current_command.move_time*room_speed; | ||
| x_turn_move = (current_command.x_end - x)/move_time; | ||
| y_turn_move = (current_command.y_end - y)/move_time; | ||
| scale_change = (current_command.end_scale - scale)/move_time; | ||
| command_count++; | ||
| } else if (array_length(animate_commands) == 0 && move_time = 0){ | ||
| x_turn_move = 0; | ||
| y_turn_move = 0; | ||
| scale_change = 0; | ||
| } | ||
| draw_sprite_ext(spr_pixel_servo_book, 0, x, y, scale, scale, 0, c_white, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical logic malfunction detected in animation protocols.
Machine spirits report erroneous assignment operators where comparisons are required. These heretical constructs will corrupt the animation sequences.
Apply these sanctified corrections:
- if (move_time = 0 && array_length(animate_commands) > 0){
+ if (move_time == 0 && array_length(animate_commands) > 0){- } else if (array_length(animate_commands) == 0 && move_time = 0){
+ } else if (array_length(animate_commands) == 0 && move_time == 0){📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (move_time = 0 && array_length(animate_commands) > 0){ | |
| current_command = animate_commands[0]; | |
| array_delete(animate_commands, 0, 1); | |
| move_time = current_command.move_time*room_speed; | |
| x_turn_move = (current_command.x_end - x)/move_time; | |
| y_turn_move = (current_command.y_end - y)/move_time; | |
| scale_change = (current_command.end_scale - scale)/move_time; | |
| command_count++; | |
| } else if (array_length(animate_commands) == 0 && move_time = 0){ | |
| x_turn_move = 0; | |
| y_turn_move = 0; | |
| scale_change = 0; | |
| } | |
| draw_sprite_ext(spr_pixel_servo_book, 0, x, y, scale, scale, 0, c_white, 1); | |
| if (move_time == 0 && array_length(animate_commands) > 0){ | |
| current_command = animate_commands[0]; | |
| array_delete(animate_commands, 0, 1); | |
| move_time = current_command.move_time*room_speed; | |
| x_turn_move = (current_command.x_end - x)/move_time; | |
| y_turn_move = (current_command.y_end - y)/move_time; | |
| scale_change = (current_command.end_scale - scale)/move_time; | |
| command_count++; | |
| } else if (array_length(animate_commands) == 0 && move_time == 0){ | |
| x_turn_move = 0; | |
| y_turn_move = 0; | |
| scale_change = 0; | |
| } | |
| draw_sprite_ext(spr_pixel_servo_book, 0, x, y, scale, scale, 0, c_white, 1); |
🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml around lines 1787 to 1800, the code uses
assignment operators (=) instead of comparison operators (==) in the if
conditions, causing logic errors. Replace all instances of single equals (=) in
the if and else if conditions with double equals (==) to correctly perform
comparisons and fix the animation sequence logic.
| bookleft_page_loc = [(1000 * scale),1100*scale, 2000*scale, 2400*scale]; | ||
| bookright_page_loc = [(2000 * scale),1100*scale, 3000*scale, 2400*scale]; | ||
|
|
||
| var rel_locations = [coord_relevative_positions(bookleft_page_loc,x,y), coord_relevative_positions(bookright_page_loc,x,y)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Update function invocation to match corrected designation.
When correcting the function name typo in scr_hit.gml, ensure this invocation is also updated.
🏁 Script executed:
#!/bin/bash
# Description: Verify all usages of the misspelled function name
# Test: Search for all occurrences of the typo. Expect: Only these two locations.
rg "coord_relevative_positions" -A 2 -B 2Length of output: 1306
By the Omnissiah, correct the function spelling across the codebase.
The typo coord_relevative_positions must be renamed to coord_relative_positions in all definition and invocation sites:
• scripts/scr_hit/scr_hit.gml
– Rename function definition
• scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml
– Update invocation
• objects/obj_controller/Create_0.gml (line 1805)
– Update both calls in the array literal
Example diff for Create_0.gml:
- var rel_locations = [coord_relevative_positions(bookleft_page_loc,x,y), coord_relevative_positions(bookright_page_loc,x,y)];
+ var rel_locations = [coord_relative_positions(bookleft_page_loc, x, y), coord_relative_positions(bookright_page_loc, x, y)];📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| var rel_locations = [coord_relevative_positions(bookleft_page_loc,x,y), coord_relevative_positions(bookright_page_loc,x,y)]; | |
| var rel_locations = [coord_relative_positions(bookleft_page_loc, x, y), coord_relative_positions(bookright_page_loc, x, y)]; |
🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml at line 1805, the function name
coord_relevative_positions is misspelled and should be updated to
coord_relative_positions. Change all occurrences of coord_relevative_positions
in this line to coord_relative_positions to match the corrected function name
used throughout the codebase.
I checked this, and I can't really tell how I feel about this. The sprite you use is a good fit for a button, like a button to open a ledger, or codex, or quest log, etc. Imo, that is. |
|
An alternative route - you redo half of the asset, so that it's a perfect base for the text. Not sure how far you want to go with this, though, and not sure if it'll be worth it in the end. |
This is kind of like more what i was thinking like this is ostensibly a currently working and technically working but theoretically wip, like i'm 100% certain if i was to go with this route i wouldn;t keep the background on the sprite and i would rework the sprite to fit wit the text. And i'm allso 100% certain i would get a different font for the text aand also makee the background so the text could be black not white. In hindsight these are probably caveats i should have mentioned from the outset. but yeah, as i say not sure, the concept may be best useable else where with any number of variations to it, or it might be fine but i gotta just keep working it. Also i'm kind of just experimenting with how a revised ui might work so in general is a more dynamic movable setup something even worth investing time in (i mean it's also just generally enjoyable so pure effort vs reward is kinda irrelevant to me on some levels) |
|
This PR is marked as stale, because it has been open for 7 days with no activity. |
Purpose
Describe your changes/additions
What can/needs to be improved/changed
Testing done
Related things and/or additional context