From 369b9cdc9289f28d9b13860059b2203c6166385f Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:33:46 -0400 Subject: [PATCH] Expose STRUCT_GENERIC in JS structure object "stattype" property --- src/quickjs_backend.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/quickjs_backend.cpp b/src/quickjs_backend.cpp index 888f81ef770..c9cb544eaec 100644 --- a/src/quickjs_backend.cpp +++ b/src/quickjs_backend.cpp @@ -795,7 +795,7 @@ JSValue convResearch(const RESEARCH *psResearch, JSContext *ctx, int player) //;; * ```cost``` What it would cost to build this structure. (3.2+ only) //;; * ```stattype``` The stattype defines the type of structure. It will be one of ```HQ```, ```FACTORY```, ```POWER_GEN```, //;; ```RESOURCE_EXTRACTOR```, ```LASSAT```, ```DEFENSE```, ```WALL```, ```RESEARCH_LAB```, ```REPAIR_FACILITY```, -//;; ```CYBORG_FACTORY```, ```VTOL_FACTORY```, ```REARM_PAD```, ```SAT_UPLINK```, ```GATE``` and ```COMMAND_CONTROL```. +//;; ```CYBORG_FACTORY```, ```VTOL_FACTORY```, ```REARM_PAD```, ```SAT_UPLINK```, ```GATE```, ```STRUCT_GENERIC```, and ```COMMAND_CONTROL```. //;; * ```modules``` If the stattype is set to one of the factories, ```POWER_GEN``` or ```RESEARCH_LAB```, then this property is set to the //;; number of module upgrades it has. //;; * ```canHitAir``` True if the structure has anti-air capabilities. (3.2+ only) @@ -842,7 +842,6 @@ JSValue convStructure(const STRUCTURE *psStruct, JSContext *ctx) case REF_GATE: stattype = (int)REF_WALL; break; - case REF_GENERIC: case REF_FORTRESS: case REF_DEFENSE: stattype = (int)REF_DEFENSE;