diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000000..8df6e39f93 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Gobo formatting commit +dfaee2ac365996e0102b320aab97786ac0498c9b \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index e8266f4046..84208af580 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,12 +1,15 @@ * text working-tree-encoding=UTF-8 # Set the default behavior, in case people don't have core.autocrlf set. -* text=auto +* text=auto eol=lf -# For safety -*.yyp text eol=crlf -*.yy text eol=crlf -*.gml text eol=crlf +# For Windows safety +*.cmd text eol=crlf +*.CMD text eol=crlf +*.bat text eol=crlf +*.BAT text eol=crlf +*.ps1 text eol=crlf +*.PS1 text eol=crlf # Re-classify .yy files (for GMS 2 projects) *.yy linguist-language=GML diff --git a/ChapterMaster.yyp b/ChapterMaster.yyp index 8c9cc6fb9b..b5b790c847 100644 --- a/ChapterMaster.yyp +++ b/ChapterMaster.yyp @@ -756,7 +756,6 @@ {"id":{"name":"scr_apothecary_ground","path":"scripts/scr_apothecary_ground/scr_apothecary_ground.yy",},}, {"id":{"name":"scr_apothecary_ship","path":"scripts/scr_apothecary_ship/scr_apothecary_ship.yy",},}, {"id":{"name":"scr_array_functions","path":"scripts/scr_array_functions/scr_array_functions.yy",},}, - {"id":{"name":"scr_arti_descr","path":"scripts/scr_arti_descr/scr_arti_descr.yy",},}, {"id":{"name":"scr_audience","path":"scripts/scr_audience/scr_audience.yy",},}, {"id":{"name":"scr_battle_allies","path":"scripts/scr_battle_allies/scr_battle_allies.yy",},}, {"id":{"name":"scr_battle_sort","path":"scripts/scr_battle_sort/scr_battle_sort.yy",},}, diff --git a/options/main/options_main.yy b/options/main/options_main.yy index d143532e2c..1c45662d5b 100644 --- a/options/main/options_main.yy +++ b/options/main/options_main.yy @@ -2,7 +2,7 @@ "$GMMainOptions":"v5", "%Name":"Main", "name":"Main", - "option_allow_instance_change":true, + "option_allow_instance_change":false, "option_audio_error_behaviour":false, "option_author":"", "option_collision_compatibility":false, diff --git a/scripts/scr_add_artifact/scr_add_artifact.gml b/scripts/scr_add_artifact/scr_add_artifact.gml index d05562120b..a48842a5fd 100644 --- a/scripts/scr_add_artifact/scr_add_artifact.gml +++ b/scripts/scr_add_artifact/scr_add_artifact.gml @@ -443,11 +443,11 @@ function ArtifactStruct(Index) constructor { var demonSummonChance = roll_dice_chapter(1, 100, "high"); if ((demonSummonChance <= 60) && (obj_ini.ship_carrying[_ship_id] > 0)) { - instance_create(0, 0, obj_ncombat); - obj_ncombat.battle_special = "ship_demon"; - obj_ncombat.formation_set = 1; - obj_ncombat.enemy = 10; - obj_ncombat.battle_id = _ship_id; + var _combat = instance_create_depth(0, 0, 0, obj_ncombat); + _combat.battle_special = "ship_demon"; + _combat.formation_set = 1; + _combat.enemy = 10; + _combat.battle_id = _ship_id; scr_ship_battle(_ship_id, 999); } } @@ -604,7 +604,193 @@ function ArtifactStruct(Index) constructor { custom_description = ""; bearer = false; - static description = scr_arti_descr; + static assign_text_from_tag_match = function(text_set) { + var _return_text = ""; + var _tag_names = struct_get_names(text_set); + var _len = array_length(_tag_names); + + for (var i = 0; i < _len; i++) { + if (has_tag(_tag_names[i])) { + _return_text = text_set[$ _tag_names[i]]; + break; + } + } + return _return_text; + }; + + /// @desc Generates a formatted description for an artifact based on its tags and type. + /// @returns {string} The full descriptive text. + static get_description = function() { + var _custom_desc = string(custom_description); + + if (_custom_desc != "") { + return _custom_desc; + } + + var _final_description = ""; + var _mission_text = ""; + var _aesthetic_text = ""; + var _extra_text = ""; + + var _type_category = determine_base_type(); + var _specific_type = type(); + var _is_inquisition = has_tag("inq"); + var _is_chaos_gift = has_tag("chaos_gift"); + + // 1. Mission Data + if (_type_category != "armour") { + _mission_text = $"This artifact is a {_specific_type}"; + } else { + _mission_text = $"This artifact is {_specific_type}"; + } + + if (_is_inquisition) { + _mission_text += ", entrusted by the Inquisition.#"; + } else if (_is_chaos_gift) { + _mission_text = $"This artifact is a {_specific_type} gifted by the Chaos Lord."; + } else { + _mission_text += ".#"; + } + + // 2. Aesthetic Logic + if (_type_category == "weapon") { + static _weapon_primary = { + "RUNE": "Several glowing runes have been carved along its surfaces.", + "SCOPE": "An extremely finely crafted scope, with several lenses, sits on top.", + "DUB": "Rather than a single power fist there is a matching pair of two.", + "ADAMANTINE": "All ceremite on the weapon has been substituted for polished adamantium.", + "VOI": "The weapon is black as night, with green, pulsing veins of an unknown energy.", + "CHB": "The striking surface has been replaced with a very powerful chainblade.", + "UFL": "A promethium flamethrower has been built in to the bottom of the weapon.", + }; + + _aesthetic_text = string(assign_text_from_tag_match(_weapon_primary)); + + if (_specific_type == "Power Fist" && has_tag("CHB")) { + _aesthetic_text = "The addition of a small chainblade has turned it into a chainfist."; + } + + static _weapon_secondary = { + "GOLD": "It is decorated with gold filigree.", + "GLOW": "It glows with an eery, soft blue color.", + "UBOLT": "A bolter has been integrated.", + }; + _extra_text = string(assign_text_from_tag_match(_weapon_secondary)); + } else if (_type_category == "armour") { + static _armour_primary = { + "ART": "Much of the armour is made up of finely articulated plates, neatly interlocking.", + "SPIKES": "A multitude of spikes, of varying sizes, adorn the armour.", + "RUNE": "Several glowing runes have been carved along its surfaces.", + "DRA": "Several areas of the armour have been patched over with Drake scales.", + }; + _aesthetic_text = string(assign_text_from_tag_match(_armour_primary)); + + static _armour_secondary = { + "GOLD": "It is decorated with gold filigree.", + "GLOW": "The optics glow dark red.", + "PUR": "It has many crude purity seals.", + }; + _extra_text = string(assign_text_from_tag_match(_armour_secondary)); + } else if (_type_category == "gear") { + static _gear_primary = { + "SUP": "It has been carved with such intricate detail that the facets are uncountable.", + "ADAMANTINE": "All ceremite on the item has been substituted for polished adamantium.", + "GOLD": "All ceremite on the item has been replaced with shining, polished gold.", + }; + _aesthetic_text = string(assign_text_from_tag_match(_gear_primary)); + + static _gear_secondary = { + "SAL": "An emblem of a Fire Drake is embossed on the cover.", + "ADAMANTINE": "All ceremite on the item has been substituted for polished adamantium.", + "GOLD": "All ceremite on the item has been replaced with shining, polished gold.", + "GLOW": "It glows a soft green color.", + "BUR": "Small, non-burning flames lick across the surface.", + "BIG": "It is of unusually large size.", + "SOO": "It has a soothing appearance.", + "RUNE": "Several glowing runes have been carved along its surfaces.", + "MASK": "It is shaped and contorted into a Fearsome Mask.", + "SPIKES": "A multitude of spikes, of varying sizes, adorn it.", + "SKRE": "While on it lets out a tormented scream.", + "SILENT": "Somehow it is completely silent in operation.", + "GOR": "The arms are especially lengthy and massively strong.", + "TENTACLES": "Instead of a single arm it is made up of many smaller tentacles.", + }; + _extra_text = string(assign_text_from_tag_match(_gear_secondary)); + } else if (_type_category == "device") { + if (_specific_type != "Robot") { + static _dev_primary = { + "GLOW": "It emits a sickly, red glow that unnerves those that look upon it.", + "ADAMANTINE": "The device is seemingly built of near-pure adamantium, impressively heavy.", + "GOLD": "The device is covered in a thin layer of gold, which glitters and shines.", + "CRU": "Many parts of the device are crumbling apart and cracking from old age.", + }; + _aesthetic_text = string(assign_text_from_tag_match(_dev_primary)); + + static _dev_secondary = { + "SKU": "It is fashioned to resemble a massive pile of skulls of all races and ages.", + "FAL": "It resembles an angel, fallen with broken wings, a sad look on its face.", + "TENTACLES": "Carved on top is a ball of wriggling tentacles, eyes, and fangs.", + "MIN": "The top panel seemingly writhes with motion, the geometric shapes blinding to behold.", + "GOAT": "It resembles a bipedal goat with odd skin blemishes and four small horns.", + "THI": "Carved on top is a strange creature with elongated limbs and small head.", + "SPE": "The statue is of a man with no eyes, ears, or nose. The teeth are rotted and mishappen.", + "DYI": "The statue is of an angel, sagging against a spear which has pierced its heart.", + "JUM": "It resembles a scene of small children with large heads happily jumping into a pit of magma.", + "CHE": "The statue resembles a fat grinx which smiles and looks outward with a malicious gaze.", + }; + _extra_text = string(assign_text_from_tag_match(_dev_secondary)); + } else { + static _bot_primary = { + "HU": "It is built in the likeness of an attractive human female.", + "RO": "It is squat and fat, though tall, and has simple utilitarian limbs.", + "SHI": "The device is covered in a thin layer of gold, which glitters and shines.", + "CRU": "It resembles a roaring, four-armed woman with abundant curves.", + }; + _aesthetic_text = string(assign_text_from_tag_match(_bot_primary)); + + static _bot_secondary = { + "ADAMANTINE": "The machine is seemingly built of near-pure adamantium, impressively heavy.", + "JAD": "The machine is built out of a type of jade, pure black, with many veins of green.", + "BRO": "The machine is made out of a strange bronze material that seems impossibly durable.", + "RUNE": "Several glowing runes have been carved along its surfaces.", + }; + _extra_text = string(assign_text_from_tag_match(_bot_secondary)); + } + } + + // 3. Final Assembly + if (has_tag("MINOR")) { + _extra_text += " It is more crude and utilitarian than one might expect from an artifact."; + } + + var _taint_text = ""; + if (has_tag("chaos")) { + _taint_text = "It bears the taint of Chaos."; + } + if (has_tag("daemonic")) { + _taint_text = "It is infested with a Daemonic entity. Destroying it, may cause the entity to materialize."; + } + + _final_description = _mission_text; + if (_aesthetic_text != "") { + _final_description += $" {_aesthetic_text}"; + } + if (_extra_text != "") { + _final_description += $" {_extra_text}"; + } + if (_taint_text != "") { + _final_description += $" {_taint_text}"; + } + + if (equipped() && is_array(bearer)) { + var _unit = fetch_unit(bearer); + if (is_struct(_unit)) { + _final_description += $"#It is currently in the possession of {_unit.name_role()}."; + } + } + + return string(_final_description); + }; } function corrupt_artifact_collectors(last_artifact) { diff --git a/scripts/scr_arti_descr/scr_arti_descr.gml b/scripts/scr_arti_descr/scr_arti_descr.gml deleted file mode 100644 index f6b7c134de..0000000000 --- a/scripts/scr_arti_descr/scr_arti_descr.gml +++ /dev/null @@ -1,177 +0,0 @@ -function scr_arti_descr() { - var mission_data = "", basic_asthetic = "", other_data = "", p4 = "", final_description = "", typ = "", good = 0, text_possibles; - // This script generates the longish artifact description. - if (custom_description == "") { - var temp = tags(); - - typ = determine_base_type(); - - var inq_mission = has_tag("inq"); - if (typ != "armour") { - mission_data = $"This artifact is a {type()}"; - if (inq_mission) { - mission_data += ", entrusted by the Inquisition.#"; - } else if (!inq_mission) { - mission_data += ".#"; - } - } else if (typ == "armour") { - mission_data = $"This artifact is {type()}"; - if (inq_mission) { - mission_data += ", entrusted by the Inquisition.#"; - } else { - mission_data += ".#"; - } - } - - if (!inq_mission && has_tag("chaos_gift")) { - mission_data = $"This artifact is a {type()} gifted by the Chaos Lord."; - } - - if (typ == "weapon") { - text_possibles = { - "RUNE": "Several glowing runes have been carved along its surfaces.", - "SCOPE": "An extremely finely crafted scope, with several lenses, sits on top.", - "DUB": "Rather than a single power fist there is a matching pair of two.", - "ADAMANTINE": "All ceremite on the weapon has been substituted for polished adamantium.", - "VOI": "The weapon is black as night, with green, pulsing veins of an unknown energy.", - "CHB": "The striking surface has been replaced with a very powerful chainblade.", - "UFL": "A promethium flamethrower has been built in to the bottom of the weapon.", - }; - if (type() == "Power Fist") { - text_possibles.CHB = "The addition of a small chainblade has turned it into a chainfist."; - } - basic_asthetic = assign_text_from_tag_match(text_possibles); - - text_possibles = { - "GOLD": "It is decorated with gold filigree.", - "GLOW": "It glows with an eery, soft blue color.", - "UBOLT": "A bolter has been integrated.", - }; - other_data = assign_text_from_tag_match(text_possibles); - } else if (typ == "armour") { - text_possibles = { - "ART": "Much of the armour is made up of finely articulated plates, neatly interlocking.", - "SPIKES": "A multitude of spikes, of varying sizes, adorn the armour.", - "RUNE": "Several glowing runes have been carved along its surfaces.", - "DRA": "Several areas of the armour have been patched over with Drake scales.", - }; - - basic_asthetic = assign_text_from_tag_match(text_possibles); - text_possibles = { - "GOLD": "It is decorated with gold filigree.", - "GLOW": "The optics glow dark red.", - "PUR": "It has many crude purity seals.", - }; - other_data = assign_text_from_tag_match(text_possibles); - } else if (typ == "gear") { - text_possibles = { - "SUP": "It has been carved with such intricate detail that the facets are uncountable.", - "ADAMANTINE": "All ceremite on the item has been substituted for polished adamantium.", - "GOLD": "All ceremite on the item has been replaced with shining, polished gold.", - }; - basic_asthetic = assign_text_from_tag_match(text_possibles); - - text_possibles = { - "SAL": "An emblem of a Fire Drake is embossed on the cover.", - "ADAMANTINE": "All ceremite on the item has been substituted for polished adamantium.", - "GOLD": "All ceremite on the item has been replaced with shining, polished gold.", - "GLOW": "It glows a soft green color.", - "BUR": "Small, non-burning flames lick across the surface.", - "BIG": "It is of unusually large size.", - "SOO": "It has a soothing appearance.", - "RUNE": "Several glowing runes have been carved along its surfaces.", - "MASK": "It is shaped and contorted into a Fearsome Mask.", - "SPIKES": "A multitude of spikes, of varying sizes, adorn it.", - "SKRE": "While on it lets out a tormented scream.", - "SILENT": "Somehow it is completely silent in operation.", - "GOR": "The arms are especially lengthy and massively strong.", - "TENTACLES": "Instead of a single arm it is made up of many smaller tentacles.", - }; - - other_data = assign_text_from_tag_match(text_possibles); - } else if (typ == "device") { - if (type() != "Robot") { - text_possibles = { - "GLOW": "It emits a sickly, red glow that unnerves those that look upon it.", - "ADAMANTINE": "The devise is seemingly built of near-pure adamantium, impressively heavy.", - "GOLD": "The devise is covered in a thin layer of gold, which glitters and shines.", - "CRU": "Many parts of the device are crumbling apart and cracking from old age.", - }; - basic_asthetic = assign_text_from_tag_match(text_possibles); - - text_possibles = { - "SKU": "It is fashioned to resemble a massive pile of skulls of all races and ages.", - "FAL": "It resembles an angel, fallen with broken wings, a sad look on its face.", - "TENTACLES": "Carved on top is a ball of wriggling tentacles, eyes, and fangs.", - "MIN": "The top panel seemingly writhes with motion, the geometric shapes blinding to behold.", - "GOAT": "It resembles a bipedal goat with odd skin blemishes and four small horns.", - "THI": "Carved on top is a strange creature with elongated limbs and small head.", - "SPE": "The statue is of a man with no eyes, ears, or nose. The teeth are rotted and mishappen.", - "DYI": "The statue is of an angel, sagging against a spear which has pierced its heart.", - "JUM": "It resembles a scene of small children with large heads happily jumping into a pit of magma.", - "CHE": "The statue resembles a fat grinx which smiles and looks outward with a malicious gaze.", - }; - - other_data = assign_text_from_tag_match(text_possibles); - } else if (type() == "Robot") { - text_possibles = { - "HU": "It is built in the likeness of an attractive human female.", - "RO": "It is squat and fat, though tall, and has simple utilitarian limbs.", - "SHI": "The devise is covered in a thin layer of gold, which glitters and shines.", - "CRU": "It resembles a roaring, four-armed woman with abundant curves.", - }; - basic_asthetic = assign_text_from_tag_match(text_possibles); - - text_possibles = { - "ADAMANTINE": "The machine is seemingly built of near-pure adamantium, impressively heavy.", - "JAD": "The machine is built out of a type of jade, pure black, with many veins of green.", - "BRO": "The machine is made out of a strange bronze material that seems impossibly durable.", - "RUNE": "Several glowing runes have been carved along its surfaces.", - }; - other_data = assign_text_from_tag_match(text_possibles); - } - } - } else { - final_description = custom_description; - } - - if (has_tag("MINOR")) { - other_data += "It is more crude and utilitarian than one might expect from an artifact."; - } - if (has_tag("chaos")) { - p4 = "It bears the taint of Chaos."; - } - if (has_tag("daemonic")) { - p4 = "It is infested with a Daemonic entity. Destroying it, may cause the entity to materialize."; - } - - final_description += mission_data; - if (basic_asthetic != "") { - final_description += $" {basic_asthetic}"; - } - if (other_data != "") { - final_description += $" {other_data}"; - } - if (p4 != "") { - final_description += $" {p4}"; - } - - if (equipped() && is_array(bearer)) { - var unit = fetch_unit(bearer); - final_description += $"#It is currently in the possession of {unit.name_role()}."; - } - - return final_description; -} - -function assign_text_from_tag_match(text_set) { - var return_text = ""; - var tag_names = struct_get_names(text_set); - for (var i = 0; i < array_length(tag_names); i++) { - if (has_tag(tag_names[i])) { - return_text = text_set[$ tag_names[i]]; - break; - } - } - return return_text; -} diff --git a/scripts/scr_arti_descr/scr_arti_descr.yy b/scripts/scr_arti_descr/scr_arti_descr.yy deleted file mode 100644 index e2a0116517..0000000000 --- a/scripts/scr_arti_descr/scr_arti_descr.yy +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$GMScript":"v1", - "%Name":"scr_arti_descr", - "isCompatibility":false, - "isDnD":false, - "name":"scr_arti_descr", - "parent":{ - "name":"Interface", - "path":"folders/Scripts/Interface.yy", - }, - "resourceType":"GMScript", - "resourceVersion":"2.0", -} \ No newline at end of file diff --git a/scripts/scr_librarium/scr_librarium.gml b/scripts/scr_librarium/scr_librarium.gml index f952d90d1d..1470667e36 100644 --- a/scripts/scr_librarium/scr_librarium.gml +++ b/scripts/scr_librarium/scr_librarium.gml @@ -28,6 +28,7 @@ function scr_librarium_gui() { pop_draw_return_values(); exit; } + /// @type {Struct.ArtifactStruct} var cur_arti = obj_ini.artifact_struct[menu_artifact]; identifiable = cur_arti.is_identifiable(); @@ -55,11 +56,13 @@ function scr_librarium_gui() { } else if (cur_arti.identified() < 1) { draw_set_color(881503); artif_descr = ""; + try { - artif_descr = cur_arti.description(); + artif_descr = cur_arti.get_description(); } catch (_exception) { handle_exception(_exception); } + tooltip = ""; tooltip_other = ""; var arti_data = gear_weapon_data("any", cur_arti.type(), "all", false, cur_arti.quality()); diff --git a/stitch.config.json b/stitch.config.json index 6b51cf7b14..0b0a0012cc 100644 --- a/stitch.config.json +++ b/stitch.config.json @@ -14,6 +14,14 @@ "pattern" : "is cropped, sprites used by Spine must be uncropped$", "base" : "color:#808080;" }, + { + "pattern": "\\bwarn(ing)?\\b", + "base": "color: #FFD900" + }, + { + "pattern": "\\berror\\b", + "base": "color: #FF0000" + }, { "pattern": "^(?