Skip to content

Commit

Permalink
v2.6.1 released
Browse files Browse the repository at this point in the history
  • Loading branch information
Trylobot committed Feb 2, 2013
1 parent 72ecfc0 commit d5079c5
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
3 changes: 3 additions & 0 deletions 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
Expand Down
1 change: 1 addition & 0 deletions sf-ship-ed.bmx
Expand Up @@ -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 )
Expand Down
3 changes: 2 additions & 1 deletion src/TData.type.bmx
Expand Up @@ -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
Expand Down
19 changes: 14 additions & 5 deletions src/TEditor.type.bmx
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/TStarfarerShipWeapon.type.bmx
Expand Up @@ -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%()
Expand Down
3 changes: 2 additions & 1 deletion src/TStarfarerWeapon.type.bmx
Expand Up @@ -3,7 +3,6 @@ Type TStarfarerWeapon
Field specClass$
Field type_$
Field size$
Field displayArcRadius#
Field turretSprite$
Field turretUnderSprite$
Field turretGunSprite$
Expand All @@ -12,6 +11,8 @@ Type TStarfarerWeapon
Field hardpointUnderSprite$
Field hardpointGunSprite$
Field hardpointGlowSprite$
Field everyFrameEffect$
Field displayArcRadius#
Field numFrames%
Field frameRate#
Field visualRecoil#
Expand Down

0 comments on commit d5079c5

Please sign in to comment.