-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example Banner: Add a custom banner, banner image is from Paladin Boyd and his Atom bear mod. Underground Surface Tunnels 0.2: You can use tunnels to send Rovers between different maps (underground/asteroids/etc). Build two tunnels then use the Choose Tunnel button to connect them. Grids do NOT connect! v0.2 Added info text showing name of connected tunnel. [email protected]
- Loading branch information
Showing
15 changed files
with
787 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
-- See LICENSE for terms | ||
|
||
-- Not much point without it | ||
if not g_AvailableDlc.gagarin then | ||
print(CurrentModDef.title, ": Space Race DLC not installed! Abort!") | ||
return | ||
end | ||
|
||
|
||
|
||
-- You should only need to change the list and the sponsor id | ||
|
||
|
||
|
||
-- list of entities we're going to be adding | ||
local entity_list = { | ||
"Flag_01_Bear", | ||
"Flag_02_Bear", | ||
"Flag_03_Bear", | ||
} | ||
|
||
-- Use to only replace banners for your sponsor, see below to replace banners for any sponsor | ||
local sponsor_id = "ChoGGi_CanadianSpaceAgency" | ||
|
||
-- local instead of global is quicker | ||
local EntityData = EntityData | ||
local EntityLoadEntities = EntityLoadEntities | ||
local SetEntityFadeDistances = SetEntityFadeDistances | ||
local path_loc_str = CurrentModPath .. "Entities/" | ||
local def = CurrentModDef | ||
|
||
-- No sense in making a new one for each entity | ||
local entity_template = { | ||
category_Decors = true, | ||
entity = { | ||
class_parent = "BuildingEntityClass", | ||
fade_category = "Never", | ||
material_type = "Rock", | ||
}, | ||
} | ||
|
||
for i = 1, #entity_list do | ||
local name = entity_list[i] | ||
-- Pretty much using what happens when you use ModItemEntity | ||
EntityData[name] = entity_template | ||
EntityLoadEntities[#EntityLoadEntities + 1] = { | ||
def, | ||
name, | ||
path_loc_str .. name .. ".ent" | ||
} | ||
-- No fade... I think | ||
SetEntityFadeDistances(name, -1, -1) | ||
end | ||
|
||
-- The banner class uses Flag_01_ etc to append sponsor names for entities | ||
-- I use them to pick entities instead | ||
local lookup_table = { | ||
Flag_01_ = entity_list[1], | ||
Flag_02_ = entity_list[2], | ||
Flag_03_ = entity_list[3], | ||
} | ||
|
||
-- Override banner entity pick | ||
local OrigFunc_SponsorBannerBase_GetEntity = SponsorBannerBase.GetEntity | ||
function SponsorBannerBase:GetEntity(...) | ||
|
||
-- Remove this to always replace any banner | ||
-- Keep it to lock to a specific sponsor | ||
if GetMissionSponsor().id ~= sponsor_id then | ||
--[[ | ||
The id is not the name of your sponsor, I believe it's called id in the mod editor... | ||
I don't use the mod editor (you're on your own for that), but you can find your sponsor id in items.lua | ||
]] | ||
return OrigFunc_SponsorBannerBase_GetEntity(self, ...) | ||
-- The three ... means varargs, in other words pass along any number of arguments | ||
-- This func doesn't have any args, but I always use them in case another modder adds one | ||
end | ||
-- End of remove this | ||
|
||
-- This returns the proper entity for each flag | ||
return lookup_table[self.banner] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<entity path=""> | ||
<state id="idle"> | ||
<mesh_ref ref="mesh"/> | ||
<bsphere value="359,1,1435,1515"/> | ||
<box min="-130,-137,2" max="848,138,2869"/> | ||
</state> | ||
<mesh_description id="mesh"> | ||
<mesh file="Flag_01_USA_mesh.hgm"/> | ||
<material file="banner_mesh.mtl"/> | ||
<attach name="Top" spot_pos="370,-10,3435"/> | ||
<attach name="Workdrone" spot_pos="-368,-6,0"/> | ||
<attach name="Workdrone" spot_pos="11,-390,0" spot_rot="0.0,0.0,0.7,90"/> | ||
<attach name="Workdrone" spot_pos="372,-6,0" spot_rot="0.0,0.0,1.0,180"/> | ||
<attach name="Workdrone" spot_pos="11,389,0" spot_rot="0.0,0.0,-0.7,270"/> | ||
<attach name="Workrover" spot_pos="11,-822,0" spot_rot="0.0,0.0,0.7,90"/> | ||
<attach name="Workrover" spot_pos="11,888,0" spot_rot="0.0,0.0,-0.7,270"/> | ||
<surf type="hex_shape" points="1329,-231,0;-383,13,0;1329,242,0"/> | ||
<surf type="selection" points="-250,-433,0;-500,0,0;-250,433,0"/> | ||
<surf type="selection" points="1250,-433,0;-250,-433,0;-250,433,0"/> | ||
<surf type="selection" points="1250,433,0;1250,-433,0;-250,433,0"/> | ||
<surf type="selection" points="1250,433,0;1500,0,0;1250,-433,0"/> | ||
<surf type="collision" points="-67,-120,75;-118,-70,75;-136,-1,75"/> | ||
<surf type="collision" points="-118,68,0;-136,-1,0;-118,-70,0"/> | ||
<surf type="collision" points="-118,-70,0;-67,-120,0;2,-139,0"/> | ||
<surf type="collision" points="-118,68,0;-118,-70,0;2,-139,0"/> | ||
<surf type="collision" points="-67,-120,75;-136,-1,75;71,-120,75"/> | ||
<surf type="collision" points="-118,-70,0;-136,-1,0;-39,-1,2896"/> | ||
<surf type="collision" points="2,-139,0;-67,-120,0;-18,-35,2896"/> | ||
<surf type="collision" points="-67,-120,0;-118,-70,0;-33,-21,2896"/> | ||
<surf type="collision" points="-39,-1,2896;-33,-21,2896;-118,-70,0"/> | ||
<surf type="collision" points="-33,-21,2896;-18,-35,2896;-67,-120,0"/> | ||
<surf type="collision" points="-18,-35,2896;2,-41,2896;2,-139,0"/> | ||
<surf type="collision" points="-18,-35,2896;-33,-21,2896;-39,-1,2896"/> | ||
<surf type="collision" points="-18,-35,2896;-39,-1,2896;22,-35,2896"/> | ||
<surf type="collision" points="-136,-1,75;-118,68,75;-67,119,75"/> | ||
<surf type="collision" points="-136,-1,75;-67,119,75;71,119,75"/> | ||
<surf type="collision" points="2,138,0;-67,119,0;-118,68,0"/> | ||
<surf type="collision" points="-136,-1,0;-118,68,0;-33,20,2896"/> | ||
<surf type="collision" points="-118,68,0;-67,119,0;-18,34,2896"/> | ||
<surf type="collision" points="-67,119,0;2,138,0;2,40,2896"/> | ||
<surf type="collision" points="-33,20,2896;-39,-1,2896;-136,-1,0"/> | ||
<surf type="collision" points="-18,34,2896;-33,20,2896;-118,68,0"/> | ||
<surf type="collision" points="2,40,2896;-18,34,2896;-67,119,0"/> | ||
<surf type="collision" points="-39,-1,2896;-33,20,2896;-18,34,2896"/> | ||
<surf type="collision" points="-39,-1,2896;-18,34,2896;22,34,2896"/> | ||
<surf type="collision" points="2,-139,75;-67,-120,75;71,-120,75"/> | ||
<surf type="collision" points="71,-120,0;121,-70,0;2,-139,0"/> | ||
<surf type="collision" points="121,68,0;-118,68,0;2,-139,0"/> | ||
<surf type="collision" points="-136,-1,75;71,119,75;71,-120,75"/> | ||
<surf type="collision" points="121,-70,0;121,68,0;2,-139,0"/> | ||
<surf type="collision" points="140,-1,75;121,-70,75;71,-120,75"/> | ||
<surf type="collision" points="121,-70,0;140,-1,0;121,68,0"/> | ||
<surf type="collision" points="71,119,75;140,-1,75;71,-120,75"/> | ||
<surf type="collision" points="71,-120,0;2,-139,0;2,-41,2896"/> | ||
<surf type="collision" points="121,-70,0;71,-120,0;22,-35,2896"/> | ||
<surf type="collision" points="140,-1,0;121,-70,0;36,-21,2896"/> | ||
<surf type="collision" points="2,-41,2896;22,-35,2896;71,-120,0"/> | ||
<surf type="collision" points="22,-35,2896;36,-21,2896;121,-70,0"/> | ||
<surf type="collision" points="36,-21,2896;42,-1,2896;140,-1,0"/> | ||
<surf type="collision" points="2,-41,2896;-18,-35,2896;22,-35,2896"/> | ||
<surf type="collision" points="-39,-1,2896;22,34,2896;22,-35,2896"/> | ||
<surf type="collision" points="22,34,2896;42,-1,2896;22,-35,2896"/> | ||
<surf type="collision" points="42,-1,2896;36,-21,2896;22,-35,2896"/> | ||
<surf type="collision" points="121,68,0;2,138,0;-118,68,0"/> | ||
<surf type="collision" points="-67,119,75;2,138,75;71,119,75"/> | ||
<surf type="collision" points="121,68,0;71,119,0;2,138,0"/> | ||
<surf type="collision" points="71,119,75;121,68,75;140,-1,75"/> | ||
<surf type="collision" points="71,119,0;121,68,0;36,20,2896"/> | ||
<surf type="collision" points="2,138,0;71,119,0;22,34,2896"/> | ||
<surf type="collision" points="121,68,0;140,-1,0;42,-1,2896"/> | ||
<surf type="collision" points="22,34,2896;2,40,2896;2,138,0"/> | ||
<surf type="collision" points="42,-1,2896;36,20,2896;121,68,0"/> | ||
<surf type="collision" points="36,20,2896;22,34,2896;71,119,0"/> | ||
<surf type="collision" points="-18,34,2896;2,40,2896;22,34,2896"/> | ||
<surf type="collision" points="22,34,2896;36,20,2896;42,-1,2896"/> | ||
</mesh_description> | ||
</entity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<entity path=""> | ||
<state id="idle"> | ||
<mesh_ref ref="mesh"/> | ||
<bsphere value="527,-3,2235,2335"/> | ||
<box min="-134,-141,-4" max="1188,135,4475"/> | ||
</state> | ||
<mesh_description id="mesh"> | ||
<mesh file="Flag_02_USA_mesh.hgm"/> | ||
<material file="banner_mesh.mtl"/> | ||
<attach name="Top" spot_pos="370,-10,5246"/> | ||
<attach name="Workdrone" spot_pos="-368,-6,0"/> | ||
<attach name="Workdrone" spot_pos="11,-390,0" spot_rot="0.0,0.0,0.7,90"/> | ||
<attach name="Workdrone" spot_pos="372,-6,0" spot_rot="0.0,0.0,1.0,180"/> | ||
<attach name="Workdrone" spot_pos="11,389,0" spot_rot="0.0,0.0,-0.7,270"/> | ||
<attach name="Workrover" spot_pos="11,-822,0" spot_rot="0.0,0.0,0.7,90"/> | ||
<attach name="Workrover" spot_pos="11,888,0" spot_rot="0.0,0.0,-0.7,270"/> | ||
<surf type="hex_shape" points="1329,-231,0;-383,13,0;1329,242,0"/> | ||
<surf type="selection" points="-250,-433,0;-500,0,0;-250,433,0"/> | ||
<surf type="selection" points="1250,-433,0;-250,-433,0;-250,433,0"/> | ||
<surf type="selection" points="1250,433,0;1250,-433,0;-250,433,0"/> | ||
<surf type="selection" points="1250,433,0;1500,0,0;1250,-433,0"/> | ||
<surf type="collision" points="-118,68,0;-136,-1,0;-118,-70,0"/> | ||
<surf type="collision" points="-67,-120,100;-118,-70,100;-136,-1,100"/> | ||
<surf type="collision" points="-118,-70,0;-67,-120,0;2,-139,0"/> | ||
<surf type="collision" points="-118,68,0;-118,-70,0;2,-139,0"/> | ||
<surf type="collision" points="-67,-120,100;-136,-1,100;71,-120,100"/> | ||
<surf type="collision" points="-118,-70,0;-136,-1,0;-39,-1,4569"/> | ||
<surf type="collision" points="2,-139,0;-67,-120,0;-18,-35,4569"/> | ||
<surf type="collision" points="-67,-120,0;-118,-70,0;-33,-21,4569"/> | ||
<surf type="collision" points="-39,-1,4569;-33,-21,4569;-118,-70,0"/> | ||
<surf type="collision" points="-33,-21,4569;-18,-35,4569;-67,-120,0"/> | ||
<surf type="collision" points="-18,-35,4569;2,-41,4569;2,-139,0"/> | ||
<surf type="collision" points="-18,-35,4569;-33,-21,4569;-39,-1,4569"/> | ||
<surf type="collision" points="-18,-35,4569;-39,-1,4569;22,-35,4569"/> | ||
<surf type="collision" points="-136,-1,100;-118,68,100;-67,119,100"/> | ||
<surf type="collision" points="-136,-1,100;-67,119,100;71,119,100"/> | ||
<surf type="collision" points="2,138,0;-67,119,0;-118,68,0"/> | ||
<surf type="collision" points="-136,-1,0;-118,68,0;-33,20,4569"/> | ||
<surf type="collision" points="-118,68,0;-67,119,0;-18,34,4569"/> | ||
<surf type="collision" points="-67,119,0;2,138,0;2,40,4569"/> | ||
<surf type="collision" points="-33,20,4569;-39,-1,4569;-136,-1,0"/> | ||
<surf type="collision" points="-18,34,4569;-33,20,4569;-118,68,0"/> | ||
<surf type="collision" points="2,40,4569;-18,34,4569;-67,119,0"/> | ||
<surf type="collision" points="-39,-1,4569;-33,20,4569;-18,34,4569"/> | ||
<surf type="collision" points="-39,-1,4569;-18,34,4569;22,34,4569"/> | ||
<surf type="collision" points="71,-120,0;121,-70,0;2,-139,0"/> | ||
<surf type="collision" points="2,-139,100;-67,-120,100;71,-120,100"/> | ||
<surf type="collision" points="121,68,0;-118,68,0;2,-139,0"/> | ||
<surf type="collision" points="121,-70,0;121,68,0;2,-139,0"/> | ||
<surf type="collision" points="-136,-1,100;71,119,100;71,-120,100"/> | ||
<surf type="collision" points="121,-70,0;140,-1,0;121,68,0"/> | ||
<surf type="collision" points="140,-1,100;121,-70,100;71,-120,100"/> | ||
<surf type="collision" points="71,119,100;140,-1,100;71,-120,100"/> | ||
<surf type="collision" points="71,-120,0;2,-139,0;2,-41,4569"/> | ||
<surf type="collision" points="121,-70,0;71,-120,0;22,-35,4569"/> | ||
<surf type="collision" points="140,-1,0;121,-70,0;36,-21,4569"/> | ||
<surf type="collision" points="2,-41,4569;22,-35,4569;71,-120,0"/> | ||
<surf type="collision" points="22,-35,4569;36,-21,4569;121,-70,0"/> | ||
<surf type="collision" points="36,-21,4569;42,-1,4569;140,-1,0"/> | ||
<surf type="collision" points="2,-41,4569;-18,-35,4569;22,-35,4569"/> | ||
<surf type="collision" points="-39,-1,4569;22,34,4569;22,-35,4569"/> | ||
<surf type="collision" points="22,34,4569;42,-1,4569;22,-35,4569"/> | ||
<surf type="collision" points="42,-1,4569;36,-21,4569;22,-35,4569"/> | ||
<surf type="collision" points="121,68,0;2,138,0;-118,68,0"/> | ||
<surf type="collision" points="121,68,0;71,119,0;2,138,0"/> | ||
<surf type="collision" points="-67,119,100;2,138,100;71,119,100"/> | ||
<surf type="collision" points="71,119,100;121,68,100;140,-1,100"/> | ||
<surf type="collision" points="71,119,0;121,68,0;36,20,4569"/> | ||
<surf type="collision" points="2,138,0;71,119,0;22,34,4569"/> | ||
<surf type="collision" points="121,68,0;140,-1,0;42,-1,4569"/> | ||
<surf type="collision" points="22,34,4569;2,40,4569;2,138,0"/> | ||
<surf type="collision" points="42,-1,4569;36,20,4569;121,68,0"/> | ||
<surf type="collision" points="36,20,4569;22,34,4569;71,119,0"/> | ||
<surf type="collision" points="-18,34,4569;2,40,4569;22,34,4569"/> | ||
<surf type="collision" points="22,34,4569;36,20,4569;42,-1,4569"/> | ||
</mesh_description> | ||
</entity> |
Oops, something went wrong.