Skip to content

Commit

Permalink
Expose STRUCT_GENERIC in JS structure object "stattype" property
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed May 1, 2024
1 parent 08f24b4 commit 369b9cd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/quickjs_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 369b9cd

Please sign in to comment.