From d5079c5dfd7e7642f6aa54470eeced8d8a7ad890 Mon Sep 17 00:00:00 2001 From: Trylobot Date: Fri, 1 Feb 2013 23:24:16 -0600 Subject: [PATCH] v2.6.1 released --- release/changes.log | 3 +++ sf-ship-ed.bmx | 1 + src/TData.type.bmx | 3 ++- src/TEditor.type.bmx | 19 ++++++++++++++----- src/TStarfarerShipWeapon.type.bmx | 2 +- src/TStarfarerWeapon.type.bmx | 3 ++- 6 files changed, 23 insertions(+), 8 deletions(-) diff --git a/release/changes.log b/release/changes.log index b58ee0e..238f1c7 100644 --- a/release/changes.log +++ b/release/changes.log @@ -1,4 +1,7 @@ ______________________________________________________________________________ +editor version 2.6.1 (starsector 0.54.1a) +- added support for "DECORATIVE" weapon/slot types +______________________________________________________________________________ editor version 2.6 (starsector 0.54.1a) - weapon editor can modify offsets (possibly buggy) - weapon editor can set images diff --git a/sf-ship-ed.bmx b/sf-ship-ed.bmx index 22750a1..13ce943 100644 --- a/sf-ship-ed.bmx +++ b/sf-ship-ed.bmx @@ -144,6 +144,7 @@ json.add_transform( "stringify_weapon", "$hardpointSprite:string", json.XJ_DELET json.add_transform( "stringify_weapon", "$hardpointUnderSprite:string", json.XJ_DELETE,, predicate_omit_if_empty ) json.add_transform( "stringify_weapon", "$hardpointGunSprite:string", json.XJ_DELETE,, predicate_omit_if_empty ) json.add_transform( "stringify_weapon", "$hardpointGlowSprite:string", json.XJ_DELETE,, predicate_omit_if_empty ) +json.add_transform( "stringify_weapon", "$everyFrameEffect:string", json.XJ_DELETE,, predicate_omit_if_empty ) json.add_transform( "stringify_weapon", "$projectileSpecId:string", json.XJ_DELETE,, predicate_omit_if_empty ) json.add_transform( "stringify_weapon", "$numFrames:number", json.XJ_DELETE,, predicate_omit_if_single_frame ) json.add_transform( "stringify_weapon", "$frameRate:number", json.XJ_DELETE,, predicate_omit_if_single_frame ) diff --git a/src/TData.type.bmx b/src/TData.type.bmx index b8a1d57..1a37400 100644 --- a/src/TData.type.bmx +++ b/src/TData.type.bmx @@ -54,7 +54,8 @@ Type TData 'to do Next For Local weapon_slot:TStarfarerShipWeapon = EachIn ship.weaponSlots - If weapon_slot.type_ <> "BUILT_IN" + If weapon_slot.type_ <> "BUILT_IN" .. + And weapon_slot.type_ <> "DECORATIVE" ship.builtInWeapons.Remove( weapon_slot.id ) EndIf Next diff --git a/src/TEditor.type.bmx b/src/TEditor.type.bmx index 8169322..c536e00 100644 --- a/src/TEditor.type.bmx +++ b/src/TEditor.type.bmx @@ -306,11 +306,20 @@ Type TEditor Local size_diff% = (weapon_size_value( slot_size ) - weapon_size_value( weapon.size )) 'slot type match and same size or bigger by one step 'or universal/built-in type with same size - If ( slot_type = "UNIVERSAL" And size_diff = 0 ) .. - Or ( slot_type = "BUILT_IN" And size_diff = 0 ) .. - Or ( slot_type = weapon.type_ And size_diff >= 0 And size_diff <= 1 ) - matches = matches[..(matches.length + 1)] - matches[matches.length - 1] = weapon.id + 'or decorative weapons for decorative slots + If slot_type <> "DECORATIVE" + If ( slot_type = "UNIVERSAL" And size_diff = 0 ) .. + Or ( slot_type = "BUILT_IN" And size_diff = 0 ) .. + Or ( slot_type = weapon.type_ And size_diff >= 0 And size_diff <= 1 ) + matches = matches[..(matches.length + 1)] + matches[matches.length - 1] = weapon.id + EndIf + Else + If ( slot_type = "DECORATIVE" And size_diff = 0 ) .. + And ( weapon.type_ = "DECORATIVE" ) + matches = matches[..(matches.length + 1)] + matches[matches.length - 1] = weapon.id + EndIf EndIf Next Return matches diff --git a/src/TStarfarerShipWeapon.type.bmx b/src/TStarfarerShipWeapon.type.bmx index b01482e..977de9f 100644 --- a/src/TStarfarerShipWeapon.type.bmx +++ b/src/TStarfarerShipWeapon.type.bmx @@ -15,7 +15,7 @@ Type TStarfarerShipWeapon EndMethod 'derived field Method is_builtin%() - Return (type_ = "BUILT_IN") + Return (type_ = "BUILT_IN" Or type_ = "DECORATIVE") EndMethod 'derived field Method is_system%() diff --git a/src/TStarfarerWeapon.type.bmx b/src/TStarfarerWeapon.type.bmx index f78c782..fefffbd 100644 --- a/src/TStarfarerWeapon.type.bmx +++ b/src/TStarfarerWeapon.type.bmx @@ -3,7 +3,6 @@ Type TStarfarerWeapon Field specClass$ Field type_$ Field size$ - Field displayArcRadius# Field turretSprite$ Field turretUnderSprite$ Field turretGunSprite$ @@ -12,6 +11,8 @@ Type TStarfarerWeapon Field hardpointUnderSprite$ Field hardpointGunSprite$ Field hardpointGlowSprite$ + Field everyFrameEffect$ + Field displayArcRadius# Field numFrames% Field frameRate# Field visualRecoil#