Skip to content

Commit 393a7c5

Browse files
committed
1.3.3
1 parent e84586a commit 393a7c5

25 files changed

+679
-557
lines changed

Dam Defense/Items/Boomboxes.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<StatusEffect type="Always" targettype="Contained" Condition="-0.1">
2929
<RequiredItem items="mobilebattery" type="Contained" />
3030
<Conditional condition="gt 0.0" />
31-
<sound file="%ModDir%/Sounds/sweethomealabama.ogg" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
31+
<sound file="%ModDir%/Sounds/sweethomealabama.ogg" stream="true" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
3232
</StatusEffect>
3333
<!-- zap when in water -->
3434
<StatusEffect type="InWater" targettype="Contained" Condition="0" setvalue="true" disabledeltatime="true" comparison="and" >
@@ -99,7 +99,7 @@
9999
<!-- music -->
100100
<StatusEffect type="Always" targettype="Contained" Condition="-0.1">
101101
<RequiredItem items="mobilebattery" type="Contained" />
102-
<sound file="%ModDir%/Sounds/virtualinsanity.ogg" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
102+
<sound file="%ModDir%/Sounds/virtualinsanity.ogg" stream="true" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
103103
<Conditional condition="gt 0.0" />
104104
</StatusEffect>
105105
</ItemComponent>
@@ -122,7 +122,7 @@
122122
<!-- music -->
123123
<StatusEffect type="Always" targettype="Contained" Condition="-0.1">
124124
<RequiredItem items="mobilebattery" type="Contained" />
125-
<sound file="%ModDir%/Sounds/entersandman.ogg" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
125+
<sound file="%ModDir%/Sounds/entersandman.ogg" stream="true" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
126126
<Conditional condition="gt 0.0" />
127127
</StatusEffect>
128128
</ItemComponent>
@@ -146,7 +146,7 @@
146146
<!-- music -->
147147
<StatusEffect type="Always" targettype="Contained" Condition="-0.1">
148148
<RequiredItem items="mobilebattery" type="Contained" />
149-
<sound file="%ModDir%/Sounds/banditradio.ogg" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
149+
<sound file="%ModDir%/Sounds/banditradio.ogg" stream="true" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
150150
<Conditional condition="gt 0.0" />
151151
</StatusEffect>
152152
</ItemComponent>
@@ -170,7 +170,7 @@
170170
<!-- music -->
171171
<StatusEffect type="Always" targettype="Contained" Condition="-0.1">
172172
<RequiredItem items="mobilebattery" type="Contained" />
173-
<sound file="%ModDir%/Sounds/title3.ogg" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
173+
<sound file="%ModDir%/Sounds/title3.ogg" stream="true" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
174174
<Conditional condition="gt 0.0" />
175175
</StatusEffect>
176176
</ItemComponent>
@@ -193,7 +193,7 @@
193193
<!-- music -->
194194
<StatusEffect type="Always" targettype="Contained" Condition="-0.1">
195195
<RequiredItem items="mobilebattery" type="Contained" />
196-
<sound file="%ModDir%/Sounds/comeoutandplay.ogg" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
196+
<sound file="%ModDir%/Sounds/comeoutandplay.ogg" stream="true" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
197197
<Conditional condition="gt 0.0" />
198198
</StatusEffect>
199199
</ItemComponent>
@@ -217,7 +217,7 @@
217217
<!-- music -->
218218
<StatusEffect type="Always" targettype="Contained" Condition="-0.1">
219219
<RequiredItem items="mobilebattery" type="Contained" />
220-
<sound file="%ModDir%/Sounds/drunkensailor.ogg" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
220+
<sound file="%ModDir%/Sounds/drunkensailor.ogg" stream="true" volume="1.5" selectionmode="CharacterSpecific" range="900" loop="true" />
221221
<Conditional condition="gt 0.0" />
222222
</StatusEffect>
223223
</ItemComponent>

Dam Defense/Items/Items.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@
11881188
<Wearable slots="Bag" msg="ItemMsgEquipSelect" canbeselected="false" canbepicked="true" pickkey="Select">
11891189
<sprite texture="jetshotgun.png" canbehiddenbyotherwearables="false" rotation="90" inheritlimbdepth="false" depth="0.6" sourcerect="0,0,216,60" limb="Torso" ignorelimbscale="true" scale="0.5" origin="0.45,0.88" />
11901190
</Wearable>
1191-
<RangedWeapon barrelpos="70,12" spread="0.1" unskilledspread="3" combatPriority="80" reload="1" drawhudwhenequipped="true" crosshairscale="0.2">
1191+
<RangedWeapon barrelpos="70,12" spread="0.1" unskilledspread="3" combatPriority="80" reload="0.9" drawhudwhenequipped="true" crosshairscale="0.2">
11921192
<Crosshair texture="Content/Items/Weapons/Crosshairs.png" sourcerect="0,256,256,256" />
11931193
<CrosshairPointer texture="Content/Items/Weapons/Crosshairs.png" sourcerect="256,256,256,256" />
11941194
<ParticleEmitter particle="muzzleflash" particleamount="1" velocitymin="0" velocitymax="0" />
@@ -1249,7 +1249,7 @@
12491249
<Wearable slots="Bag" msg="ItemMsgEquipSelect" canbeselected="false" canbepicked="true" pickkey="Select">
12501250
<sprite texture="Content/Items/Weapons/weapons_new.png" sourcerect="262,70,184,51" canbehiddenbyotherwearables="false" rotation="85" inheritlimbdepth="false" depth="0.6" limb="Torso" ignorelimbscale="true" scale="0.5" origin="0.45,1.0" />
12511251
</Wearable>
1252-
<RangedWeapon barrelpos="85,10" spread="1" unskilledspread="4" combatPriority="80" reload="0.1" drawhudwhenequipped="true" crosshairscale="0.2">
1252+
<RangedWeapon barrelpos="85,10" weapondamagemodifier="0.8" spread="1" unskilledspread="4" combatPriority="80" reload="0.1" drawhudwhenequipped="true" crosshairscale="0.2">
12531253
<Crosshair texture="Content/Items/Weapons/Crosshairs.png" sourcerect="0,256,256,256" />
12541254
<CrosshairPointer texture="Content/Items/Weapons/Crosshairs.png" sourcerect="256,256,256,256" />
12551255
<ParticleEmitter particle="muzzleflash" particleamount="1" velocitymin="0" velocitymax="0" />
@@ -1262,8 +1262,8 @@
12621262
<Explosion range="150.0" force="3" shockwave="false" smoke="false" flash="true" sparks="false" flames="false" underwaterbubble="false" camerashake="6.0" />
12631263
</StatusEffect>
12641264
<!-- only 2 shots can be fired at the 0.1 interval, after that you need to wait 1 second -->
1265-
<StatusEffect type="OnUse" target="This" reload="1.5" setvalue="true" delay="0.05" />
1266-
<StatusEffect type="OnUse" target="This" reload="0.1" setvalue="true" delay="1.5" />
1265+
<StatusEffect type="OnUse" target="This" reload="2.0" setvalue="true" delay="0.05" />
1266+
<StatusEffect type="OnUse" target="This" reload="0.1" setvalue="true" delay="2.0" />
12671267
<!-- Cocking sound, delayed by 1.0 seconds. -->
12681268
<StatusEffect type="OnUse" target="This" delay="0.8">
12691269
<Sound file="Content/Items/Weapons/ShotgunLoad1.ogg" type="OnUse" range="500" selectionmode="Random" />
@@ -4816,7 +4816,7 @@
48164816
<Sprite texture="foldableshotgun.png" sourcerect="0,0,220,56" depth="0.55" origin="0.5,0.25" />
48174817
<Body width="180" height="30" density="25" />
48184818
<Holdable slots="Any,RightHand+LeftHand" controlpose="true" holdpos="40,-10" aimpos="55,-8" handle1="-40,-18" handle2="25,0" holdangle="-40" msg="ItemMsgPickUpSelect" />
4819-
<RangedWeapon barrelpos="80,-15" spread="0.1" unskilledspread="3" combatPriority="80" weapondamagemodifier="1.2" reload="1.2" drawhudwhenequipped="true" crosshairscale="0.2">
4819+
<RangedWeapon barrelpos="80,-15" spread="0.1" unskilledspread="3" combatPriority="80" weapondamagemodifier="1.15" reload="1" drawhudwhenequipped="true" crosshairscale="0.2">
48204820
<Crosshair texture="Content/Items/Weapons/Crosshairs.png" sourcerect="0,256,256,256" />
48214821
<CrosshairPointer texture="Content/Items/Weapons/Crosshairs.png" sourcerect="256,256,256,256" />
48224822
<ParticleEmitter particle="muzzleflash" particleamount="1" velocitymin="0" velocitymax="0" />
@@ -5456,7 +5456,7 @@
54565456
<Body width="28" height="40" density="25" />
54575457
<ItemContainer hideitems="true" capacity="1" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true" SpawnWithId="pistolround" removecontaineditemsondeconstruct="true" containedstateindicatorstyle="bullet">
54585458
<Containable items="pistolround" />
5459-
<StatusEffect type="OnUse" target="This" condition="-1.65" disabledeltatime="true">
5459+
<StatusEffect type="OnUse" target="This" condition="-2" disabledeltatime="true">
54605460
<SpawnItem identifiers="pistolround" spawnposition="ThisInventory" />
54615461
</StatusEffect>
54625462
</ItemContainer>

Dam Defense/Localizations/english.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ return {
44
deathMessage = 'You have died! You can type /possess in chat to control a creature. Do /freecam to go back to spectating. If you want a full list of commands, do /help in chat.',
55
matchHasGoneOnForTooLong = 'The match has gone on for too long and respawning has been automatically disabled.',
66
allTheCrewIsDead = 'All of the crew is dead! Round ending in 10 seconds.',
7+
allReactorsAreBroken = 'The dam has been destroyed! Round ending in 10 seconds.',
78
commandHelp = 'List of chat commands:\n{list}',
89
commandHelpMisspell = '"{command}" is not a valid chat command. Do "/help" for a list of chat commands.',
910
commandHelpInvalid = '"{command}" is a valid chat command, but it is unusable by you in the current context. Do "/help" for a list of chat commands.',

Dam Defense/Localizations/english.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
<entityname.tommygun>Tommy Gun</entityname.tommygun>
336336
<entitydescription.tommygun>A 9mm convertion of an antique submachine gun usually associated with the mafia or any other lavish criminals. Bolsters an impressive rate of fire and fine finish.</entitydescription.tommygun>
337337
<entityname.pistoldrum>Tommy Gun Drum</entityname.pistoldrum>
338-
<entitydescription.pistoldrum>A magazine for the tommy gun containing 60 rounds of 9mm.</entitydescription.pistoldrum>
338+
<entitydescription.pistoldrum>A magazine for the tommy gun containing 50 rounds of 9mm.</entitydescription.pistoldrum>
339339
<!-- UZI -->
340340
<entityname.uzi>UZI</entityname.uzi>
341341
<entitydescription.uzi>Only craftable by gang members. A very light 9mm submachine gun with a foldable stock. This bullet hose fires faster than you can count.</entitydescription.uzi>

Dam Defense/Lua/Autorun/main.lua

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ DD.roundStartFunctions.main = function ()
7474
-- lock sub
7575
Submarine.MainSub.LockX = true
7676
Submarine.MainSub.LockY = true
77+
-- find reactors
78+
DD.reactors = {}
79+
for item in Submarine.MainSub.GetItems(false) do
80+
if item.HasTag('reactor') then
81+
table.insert(DD.reactors, item)
82+
end
83+
end
7784
end
7885

7986
-- automations for sub editor
@@ -232,6 +239,15 @@ DD.thinkFunctions.main = function ()
232239

233240
if #Client.ClientList == 1 then return end
234241

242+
-- Skip round end checks if certain events are happening
243+
local set = {
244+
[DD.eventNukies.tbl.name] = true,
245+
[DD.eventDeathSquad.tbl.name] = true,
246+
}
247+
for event in DD.eventDirector.events do
248+
if set[event.name] and event.started and not event.finished then print('test') return end
249+
end
250+
235251
-- End round if everyone is dead
236252
local anyHumanAlive = false
237253
for client in Client.ClientList do
@@ -246,6 +262,23 @@ DD.thinkFunctions.main = function ()
246262
Timer.Wait(function ()
247263
Game.EndGame()
248264
end, 10 * 1000)
265+
return
266+
end
267+
-- End round if all reactors are broken
268+
local anyReactorIsUnbroken = false
269+
for reactor in DD.reactors do
270+
if reactor.Condition > 0 then
271+
anyReactorIsUnbroken = true
272+
break
273+
end
274+
end
275+
if not anyReactorIsUnbroken then
276+
DD.messageAllClients(DD.stringLocalize('allReactorsAreBroken'), {preset = 'crit'})
277+
DD.roundData.roundEnding = true
278+
Timer.Wait(function ()
279+
Game.EndGame()
280+
end, 10 * 1000)
281+
return
249282
end
250283
end
251284

@@ -765,34 +798,28 @@ Hook.Add("character.giveJobItems", "DD.onGiveJobItems", function (character)
765798
end)
766799
end
767800
-- Give Talents
801+
local jobTalents = {
802+
captain = {'drunkensailor'},
803+
diver = {'daringdolphin', 'ballastdenizen'},
804+
securityofficer = {'physicalconditioning'},
805+
foreman = {'daringdolphin', 'ballastdenizen', 'unstoppablecuriosity', 'engineeringknowledge'},
806+
engineer = {'daringdolphin', 'ballastdenizen', 'unstoppablecuriosity', 'engineeringknowledge'},
807+
researcher = {'dontdieonme', 'firemanscarry'},
808+
medicaldoctor = {'dontdieonme', 'firemanscarry'},
809+
janitor = {'janitorialknowledge', 'greenthumb', 'firemanscarry'},
810+
mechanic = {'unlockallrecipes', 'miner'},
811+
clown = {'unlockallrecipes', 'skedaddle'},
812+
assistant = {'unlockallrecipes', 'skedaddle'},
813+
-- event jobs
814+
gangster = {'drunkensailor', 'gangknowledge'},
815+
jet = {'daringdolphin', 'ballastdenizen', 'rebelknowledge'},
816+
mercs = {'daringdolphin', 'ballastdenizen'},
817+
mercsevil = {'daringdolphin', 'ballastdenizen'},
818+
}
768819
if character.SpeciesName == 'human' then
769820
Timer.Wait(function ()
770-
if (character.JobIdentifier == 'mechanic') or (character.JobIdentifier == 'clown') or (character.JobIdentifier == 'assistant') then
771-
character.GiveTalent('unlockallrecipes', true)
772-
end
773-
if (character.JobIdentifier == 'janitor') then
774-
character.GiveTalent('janitorialknowledge', true)
775-
character.GiveTalent('greenthumb', true)
776-
end
777-
if (character.JobIdentifier == 'engineer') or (character.JobIdentifier == 'foreman') then
778-
character.GiveTalent('unstoppablecuriosity', true)
779-
character.GiveTalent('engineeringknowledge', true)
780-
end
781-
if (character.JobIdentifier == 'captain') or (character.JobIdentifier == 'gangster') or (character.JobIdentifier == 'assistant') then
782-
character.GiveTalent('drunkensailor', true)
783-
end
784-
if DD.isCharacterMedical(character) or (character.JobIdentifier == 'janitor') or (character.JobIdentifier == 'assistant') then
785-
character.GiveTalent('firemanscarry', true)
786-
end
787-
if (character.JobIdentifier == 'diver') or (character.JobIdentifier == 'engineer') or (character.JobIdentifier == 'foreman') or (character.JobIdentifier == 'jet') or (character.JobIdentifier == 'mercsevil') or (character.JobIdentifier == 'assistant') then
788-
character.GiveTalent('daringdolphin', true)
789-
character.GiveTalent('ballastdenizen', true)
790-
end
791-
if character.JobIdentifier == 'jet' then
792-
character.GiveTalent('rebelknowledge', true)
793-
end
794-
if character.JobIdentifier == 'gangster' then
795-
character.GiveTalent('gangknowledge', true)
821+
for talent in jobTalents[tostring(character.JobIdentifier)] do
822+
character.GiveTalent(talent, true)
796823
end
797824
end, 1000)
798825
end

Dam Defense/Lua/DD/events/chimera.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end, {
1212
cooldown = 60 * 3,
1313
weight = 2,
1414
goodness = -4,
15-
minimunDeadPercentage = 0.05,
15+
minimunDeadPercentage = 0.01,
1616
minimunTimeElapsed = 5 * 60,
1717

1818
onStart = function (self)

Dam Defense/Lua/DD/events/deathSquad.lua

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ end, {
1414
cooldown = 60 * 6,
1515
weight = 4,
1616
goodness = -5,
17-
minimunDeadPercentage = 0.2,
17+
minimunDeadPercentage = 0.1,
1818
minimunTimeElapsed = 20 * 60,
1919

2020
lateJoinBlacklistSet = {},
@@ -36,14 +36,6 @@ end, {
3636

3737
onStart = function (self)
3838
self.nukiesWon = false
39-
40-
-- Find reactors
41-
self.reactors = {}
42-
for item in Submarine.MainSub.GetItems(false) do
43-
if item.HasTag('reactor') then
44-
table.insert(self.reactors, item)
45-
end
46-
end
4739

4840
-- Pick nukies
4941
if self.nukies == nil then
@@ -86,7 +78,7 @@ end, {
8678

8779
-- See if any reactor is unbroken
8880
local anyReactorIsUnbroken = false
89-
for reactor in self.reactors do
81+
for reactor in DD.reactors do
9082
if reactor.Condition > 0 then
9183
anyReactorIsUnbroken = true
9284
break

Dam Defense/Lua/DD/events/gang.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ end, {
1111
cooldown = 60 * 4,
1212
weight = 2,
1313
goodness = -2,
14-
minimunDeadPercentage = 0.05,
14+
minimunDeadPercentage = 0.01,
1515

1616
removeClientFromGang = function (self, client, treason)
1717
-- remove from gang
@@ -58,6 +58,13 @@ end, {
5858
-- message recruited client
5959
DD.messageClient(client, DD.stringLocalize('gangGangsterInfo', {bossName = self.bossName, gangName = self.gangName}), {preset = 'crit'})
6060

61+
-- do gang effect
62+
Timer.Wait(function ()
63+
if DD.isClientCharacterAlive(client) then
64+
DD.giveAfflictionCharacter(character, 'gangfx', 999)
65+
end
66+
end, 1000)
67+
6168
-- reset pulmonary emphysema
6269
local affliction = client.Character.CharacterHealth.GetAffliction('pulmonaryemphysema', true)
6370
if affliction ~= nil then

Dam Defense/Lua/DD/events/greenskins.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ end, {
1414
cooldown = 60 * 6,
1515
weight = 3,
1616
goodness = -5,
17-
minimunDeadPercentage = 0.2,
17+
minimunDeadPercentage = 0.1,
1818
minimunTimeElapsed = 20 * 60,
1919

2020
lateJoinSpawn = function (self, client)

Dam Defense/Lua/DD/events/mercs.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end, {
1212
cooldown = 60 * 2,
1313
weight = 2,
1414
goodness = 3,
15-
minimunDeadPercentage = 0.1,
15+
minimunDeadPercentage = 0.01,
1616
minimunTimeElapsed = 12 * 60,
1717

1818
onStart = function (self)

0 commit comments

Comments
 (0)