-
Notifications
You must be signed in to change notification settings - Fork 60
refactor: Remove parallel mission arrays and make missions OOP objects #1562
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?
Changes from all commits
cc66a5a
d0bc872
10070ba
ac05a83
b4f76e8
73f1d83
efa0c7c
efde849
845e6a4
21536fb
ed2f4a2
3f427f9
ff83281
220d5ec
5a04082
ca017d0
ff50eeb
9f54d04
962cacd
50139ba
4b03eda
290be04
5c0daf9
7b41795
21bc626
deaea10
23d2911
1571afa
187dafa
db1643d
65e5ee4
2ca2a2a
a4ef6eb
05e0a18
d9e5856
a024a92
1ba1b92
128f3f5
2164788
bfd670d
e60e3dd
467dd7f
33fb6e6
e435dfd
229f646
0cd31bb
abef2a4
a1edff6
d2031f9
eea3d2b
956a4d6
107a2e3
bce7c33
16e333e
eda4646
89ba189
d242575
ca22304
a0f6514
6413295
7e89b2f
42dc887
a6206ad
e6a9e93
bb151f9
d4fc557
34a2e63
f81e611
ccb4b1c
76e69f2
f85592b
5f8551d
e39fa86
1e4c31c
cf61a7b
d2a5c96
f7c2b8d
43fde94
1a445b6
ba5424b
3eb7d5e
5de9e66
76bbc60
708045f
9b7070c
e2dcad9
dac29f7
eb39eca
950459d
7d7dd1e
050b1f0
04706f5
d2a1cec
a346665
bf2b83c
3af790c
afda1d3
a320d0d
3d5d10e
4bda6c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| try { | ||
| var orb = orbiting; | ||
|
|
||
| if ((round(owner) != eFACTION.IMPERIUM) && (navy == 1)) { | ||
| owner = 0; | ||
| } | ||
|
|
@@ -205,15 +203,6 @@ try { | |
| } | ||
| } | ||
|
|
||
| if (owner == eFACTION.TAU) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Removing this block changes Tau first-contact: Prompt for AI agents |
||
| if (instance_exists(obj_p_fleet) && (obj_controller.known[eFACTION.TAU] == 0)) { | ||
| var p_ship = instance_nearest(x, y, obj_p_fleet); | ||
| if ((p_ship.action == "") && (point_distance(x, y, p_ship.x, p_ship.y) <= 80)) { | ||
| obj_controller.known[eFACTION.TAU] = 1; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| if (owner == eFACTION.TYRANIDS) { | ||
| // Juggle bio-resources | ||
| if (capital_number * 2 > frigate_number) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -67,15 +67,9 @@ if (ii_check == 0) { | |||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if (owner == eFACTION.TYRANIDS) { | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.TYRANIDS && orbiting != noone) { | ||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Custom agent: Code Quality Review
Prompt for AI agents |
||||||||||||||||||||||||||||||||
| image_alpha = 0; | ||||||||||||||||||||||||||||||||
| if (instance_exists(obj_p_fleet)) { | ||||||||||||||||||||||||||||||||
| var bundy = instance_nearest(x, y, obj_p_fleet); | ||||||||||||||||||||||||||||||||
| if ((bundy.action == "") && (self.action == "") && (point_distance(bundy.x, bundy.y, x, y) < 90) && (bundy.x > x) && (bundy.y < y)) { | ||||||||||||||||||||||||||||||||
| image_alpha = 1; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if ((instance_nearest(x, y - 32, obj_star).vision == 1) && (action == "")) { | ||||||||||||||||||||||||||||||||
| if (orbiting.has_orbiting_player_fleet() || orbiting.vision == 1){ | ||||||||||||||||||||||||||||||||
|
Comment on lines
+70
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Moving Tyranid fleets now skip the alpha reset because Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||||||||||
| image_alpha = 1; | ||||||||||||||||||||||||||||||||
|
Comment on lines
+70
to
73
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Custom agent: Code Quality Review Parenthesize the comparisons in these mixed-operator conditions and add the missing space before Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
@@ -146,30 +140,7 @@ if ((owner == eFACTION.TYRANIDS) && (trade_goods == "")) { | |||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if (global.load >= 0) { | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.IMPERIUM) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_imperial; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.MECHANICUS) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_mechanicus; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.INQUISITION) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_inquisition; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.ELDAR) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_eldar; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.ORK) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_ork; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.TAU) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_tau; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.TYRANIDS) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_tyranid; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (owner == eFACTION.CHAOS) { | ||||||||||||||||||||||||||||||||
| sprite_index = spr_fleet_chaos; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| choose_fleet_sprite_image(); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (image_index == 0) { | ||||||||||||||||||||||||||||||||
| image_index = 1; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ hostile_splash = 0; | |||||||||||||||||||||||||||
| flank = 0; | ||||||||||||||||||||||||||||
| flyer = 0; // Works same as flank, but does not get denoted as such | ||||||||||||||||||||||||||||
| neww = 0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| enemy_dudes = 0; | ||||||||||||||||||||||||||||
| column_size = 0; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| unit_count = 0; | ||||||||||||||||||||||||||||
|
|
@@ -75,6 +75,26 @@ dudes_wep2 = array_create(_array_size, ""); | |||||||||||||||||||||||||||
| dudes_gear = array_create(_array_size, ""); | ||||||||||||||||||||||||||||
| dudges_mobi = array_create(_array_size, ""); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| add_enemies = function(enemy_data){ | ||||||||||||||||||||||||||||
| var _start_index = 1; | ||||||||||||||||||||||||||||
| for (var i = 1; i < _array_size; i++) | ||||||||||||||||||||||||||||
| if (dudes[i] == ""){ | ||||||||||||||||||||||||||||
| _start_index = i; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+80
to
+86
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||||||
| for (var i = 0; i < array_length(enemy_data); i++){ | ||||||||||||||||||||||||||||
| var _data = enemy_data[i]; | ||||||||||||||||||||||||||||
| dudes[_start_index] = _data.name; | ||||||||||||||||||||||||||||
| dudes_num[_start_index] = _data.number; | ||||||||||||||||||||||||||||
| if (struct_exists(_data, "special")){ | ||||||||||||||||||||||||||||
| dudes_special[_start_index] = _data.special; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| _start_index++; | ||||||||||||||||||||||||||||
| enemy_dudes += _data.number; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| alarm[1] = 5; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| hit = function() { | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
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.
P2: This removes the only way the player discovers the Tau faction without flying into Tau space: a Tau fleet parking within 80 px of a stationary player fleet. No replacement exists — only obj_p_fleet/Create_0.gml still sets known[eFACTION.TAU], and only when the player arrives at a Tau-owned planet. If the deletion is intentional, note it; otherwise keep the proximity check (e.g., in the enemy-fleet end-turn logic) so the discovery path survives the refactor.
Prompt for AI agents