-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bf16d8
commit 2016aa0
Showing
32 changed files
with
14,562 additions
and
14,496 deletions.
There are no files selected for viewing
28,195 changes: 14,059 additions & 14,136 deletions
28,195
[Addon] Harborlife/data/config/export/main/asset/assets.xml
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,69 +1,73 @@ | ||
{ | ||
"Version": "1.4", | ||
"ModID": "Spice_Harborlife", | ||
"IncompatibleIds": null, | ||
"ModDependencies": null, | ||
"Category": { | ||
"Chinese": null, | ||
"English": "Addon", | ||
"French": null, | ||
"German": "Addon", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": "Dodatek", | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null | ||
}, | ||
"ModName": { | ||
"Chinese": null, | ||
"English": "Harborlife", | ||
"French": null, | ||
"German": "Hafenstadt", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": null, | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null | ||
}, | ||
"Description": { | ||
"Chinese": null, | ||
"English": "Build a unique city in the harbor area with a set of reworked buildings, starting with 750 artisans.", | ||
"French": null, | ||
"German": "Baue eine einzigartige Hafenstadt mit dafür vorgesehenen Gebäudevarianten ab 750 Handwerkern", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": null, | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null | ||
}, | ||
"KnownIssues": [ | ||
{ | ||
"Chinese": null, | ||
"English": "Permits for Harbour Scholar Residences can only be obtained by researching new ones.", | ||
"French": null, | ||
"German": "Genehmigungen für Hafen-Gelehrtenhäuser können nur durch das Erforschen neuer Genehmigungen erlangt werden.", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": null, | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null | ||
} | ||
], | ||
"DLCDependencies": [ | ||
{ | ||
"DLC":"LandOfLions", | ||
"Dependant": "partly" | ||
} | ||
], | ||
"CreatorName": "Spice it up-Team: Mystiquebee84", | ||
"CreatorContact": "https://discord.gg/YTQGDFK", | ||
"Image" : null | ||
} | ||
"Version": "1.4", | ||
"ModID": "Spice_Harborlife", | ||
"IncompatibleIds": null, | ||
"ModDependencies": null, | ||
"Category": { | ||
"Chinese": null, | ||
"English": "Addon", | ||
"French": null, | ||
"German": "Addon", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": "Dodatek", | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null, | ||
"Czech": null | ||
}, | ||
"ModName": { | ||
"Chinese": null, | ||
"English": "Harborlife", | ||
"French": null, | ||
"German": "Hafenstadt", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": null, | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null, | ||
"Czech": null | ||
}, | ||
"Description": { | ||
"Chinese": null, | ||
"English": "Build a unique city in the harbor area with a set of reworked buildings, starting with 750 artisans.", | ||
"French": null, | ||
"German": "Baue eine einzigartige Hafenstadt mit dafür vorgesehenen Gebäudevarianten ab 750 Handwerkern", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": null, | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null, | ||
"Czech": null | ||
}, | ||
"KnownIssues": [ | ||
{ | ||
"Chinese": null, | ||
"English": "Permits for Harbour Scholar Residences can only be obtained by researching new ones.", | ||
"French": null, | ||
"German": "Genehmigungen für Hafen-Gelehrtenhäuser können nur durch das Erforschen neuer Genehmigungen erlangt werden.", | ||
"Italian": null, | ||
"Japanese": null, | ||
"Korean": null, | ||
"Polish": null, | ||
"Russian": null, | ||
"Spanish": null, | ||
"Taiwanese": null, | ||
"Czech": null | ||
} | ||
], | ||
"DLCDependencies": [ | ||
{ | ||
"DLC": "LandOfLions", | ||
"Dependant": "partly" | ||
} | ||
], | ||
"CreatorName": "Spice it up-Team: Mystiquebee84", | ||
"CreatorContact": "https:\/\/discord.gg\/YTQGDFK", | ||
"Image": null | ||
} |
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,155 @@ | ||
local Participants = { | ||
"jorgensen", | ||
"qing", | ||
"wibblesock", | ||
"smith", | ||
"omara", | ||
"gasparov", | ||
"malching", | ||
"gravez", | ||
"silva", | ||
"hunt", | ||
"mercier", | ||
"nate", | ||
"harlow", | ||
"fortune" | ||
} | ||
|
||
local ParticipantID = { | ||
["queen"] = 15, | ||
["jorgensen"] = 25, | ||
["qing"] = 26, | ||
["wibblesock"] = 27, | ||
["smith"] = 28, | ||
["omara"] = 29, | ||
["gasparov"] = 30, | ||
["malching"] = 31, | ||
["gravez"] = 32, | ||
["silva"] = 33, | ||
["hunt"] = 34, | ||
["mercier"] = 64, | ||
["nate"] = 22, | ||
["harlow"] = 17, | ||
["fortune"] = 18 | ||
} | ||
|
||
local DenyQuest = { | ||
["AlreadyIngame"] = 930500, | ||
["tooManyAIs"] = 930501 | ||
} | ||
|
||
local AcceptQuest = { | ||
["jorgensen"] = 930251, | ||
["qing"] = 930252, | ||
["wibblesock"] = 930253, | ||
["smith"] = 930254, | ||
["omara"] = 930255, | ||
["gasparov"] = 930256, | ||
["malching"] = 930257, | ||
["gravez"] = 930258, | ||
["silva"] = 930259, | ||
["hunt"] = 930260, | ||
["mercier"] = 930261, | ||
["nate"] = 930262, | ||
["harlow"] = 0, | ||
["fortune"] = 0 | ||
} | ||
|
||
local AiLimit = 3 | ||
|
||
local DoNotCount = { | ||
["queen"] = 1, | ||
["nate"] = 1 | ||
} | ||
|
||
--#region FUNCTIONS | ||
|
||
local function Accept(ParticipantName) | ||
ts.SessionParticipants.SetCheatCreateSessionParticipant(ParticipantID[ParticipantName]) | ||
ts.Quests.StartQuestForCurrentPlayerNet(AcceptQuest[ParticipantName]) | ||
end | ||
|
||
local function TooManyParticipants() | ||
local _aiCount = 0 | ||
|
||
for key, participant in pairs(Participants) do | ||
print(participant) | ||
-- I am beginning to hate this language | ||
local def = AISpawner.IsParticipantDefined(participant) | ||
local counted = AISpawner.IsParticipantCounted(participant) | ||
if def and counted then | ||
_aiCount = _aiCount + 1 | ||
end | ||
end | ||
return AiLimit <= _aiCount | ||
end | ||
|
||
local function IsCounted(ParticipantName) | ||
return not DoNotCount[participant] == 1 | ||
end | ||
|
||
local function IsDefinedByID(ParticipantID) | ||
local participant = ts.SessionParticipants.GetParticipant(ParticipantID).GUID | ||
local result = not participant == 0 | ||
return result | ||
end | ||
|
||
local function IsDefined(ParticipantName) | ||
local pid = ParticipantID[ParticipantName] | ||
return IsDefinedByID(pid) | ||
end | ||
|
||
local function IsValidParticipant(ParticipantName) | ||
for key, participant in pairs(Participants) do | ||
if participant == ParticipantName then | ||
return true | ||
end | ||
end | ||
return false | ||
end | ||
|
||
local function Spawn(ParticipantName) | ||
|
||
print("trying to spawn " .. ParticipantName) | ||
|
||
if not IsValidParticipant(ParticipantName) then | ||
print("Invalid Participant: " .. ParticipantName) | ||
return | ||
end | ||
|
||
print("we got past the valid state") | ||
|
||
if IsDefined(ParticipantName) then | ||
print(ParticipantName .. " is already defined") | ||
ts.Quests.StartQuestForCurrentPlayerNet(DenyQuest["AlreadyIngame"]) | ||
elseif TooManyParticipants() then | ||
print("maximum participants reached") | ||
ts.Quests.StartQuestForCurrentPlayerNet(DenyQuest["tooManyAIs"]) | ||
else | ||
print("accept" .. ParticipantName) | ||
Accept(ParticipantName) | ||
end | ||
end | ||
|
||
local function Delete(ParticipantName) | ||
if IsValidParticipant(ParticipantName) then | ||
local pid = ParticipantID[ParticipantName] | ||
ts.Participants.SetRemoveParticipant(pid) | ||
end | ||
end | ||
|
||
-- #Region AI Spawner API Definition | ||
|
||
AISpawner = { | ||
Participants = Participants, | ||
AiLimit = AiLimit, | ||
SetCheatSpawnParticipant = Accept, | ||
ParticipantLimitReached = TooManyParticipants, | ||
IsParticipantDefined = IsDefined, | ||
IsParticipantCounted = IsCounted, | ||
SpawnParticipant = Spawn, | ||
DeleteParticipant = Delete, | ||
CheckParticipantValidity = IsValidParticipant | ||
} | ||
|
||
print("initializing AI spawner") |
Oops, something went wrong.