Skip to content

Commit 519b2f3

Browse files
committed
1.3.0 (EXPERIMENTAL #1)
1 parent 3440d6b commit 519b2f3

File tree

12 files changed

+153
-38
lines changed

12 files changed

+153
-38
lines changed

Dam Defense/Items/Items.xml

Lines changed: 110 additions & 13 deletions
Large diffs are not rendered by default.

Dam Defense/Localizations/english.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
<entitydescription.762round>A round of 7x62x39mm.</entitydescription.762round>
325325
<!-- Marksmen Rifle -->
326326
<entityname.marksmanrifle>Marksmen Rifle</entityname.marksmanrifle>
327-
<entitydescription.marksmanrifle>Only craftable by rebel leaders. Precision 7.62x39mm semi-automatic rifle. The right arm of the free world.</entitydescription.marksmanrifle>
327+
<entitydescription.marksmanrifle>Only craftable by rebel leaders. Precision 7.62x39mm semi-automatic rifle that comes with a scope attached. The right arm of the free world.</entitydescription.marksmanrifle>
328328
<!-- Tommy Gun -->
329329
<entityname.tommygun>Tommy Gun</entityname.tommygun>
330330
<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>

Dam Defense/Lua/Autorun/main.lua

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -714,28 +714,45 @@ Hook.Add("character.giveJobItems", "DD.onGiveJobItems", function (character)
714714
if client ~= nil then
715715
DD.messageClient(client, JobPrefab.Get(character.JobIdentifier).Description, {preset = 'info'})
716716
end
717-
-- Event related jobs
717+
-- Items to be locked (to be made non interactable)
718+
local lockedJobItems = {
719+
captain = {
720+
[DD.invSlots.innerclothes] = {captainsuniform1 = true, captainsuniform3 = true}
721+
},
722+
diver = {
723+
[DD.invSlots.innerclothes] = {securityuniform2 = true}
724+
},
725+
securityofficer = {
726+
[DD.invSlots.innerclothes] = {securityuniform1 = true}
727+
},
728+
foreman = {
729+
[DD.invSlots.innerclothes] = {orangejumpsuit2 = true}
730+
},
731+
-- event jobs
732+
wizard = {
733+
[DD.invSlots.head] = {merasmushat = true},
734+
},
735+
gangster = {
736+
[DD.invSlots.head] = {bosshat = true},
737+
[DD.invSlots.innerclothes] = {bossclothes = true},
738+
},
739+
}
740+
local lockedItems = lockedJobItems[tostring(character.JobIdentifier)]
741+
if lockedItems ~= nil then
742+
for slot, itemSet in pairs(lockedItems) do
743+
local item = character.Inventory.GetItemAt(slot)
744+
if itemSet[tostring(item.Prefab.Identifier)] then
745+
item.NonInteractable = true
746+
if SERVER then
747+
local nonInteractable = item.SerializableProperties[Identifier("NonInteractable")]
748+
Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(nonInteractable, item))
749+
end
750+
end
751+
end
752+
end
753+
-- Event related job
718754
if character.JobIdentifier == 'wizard' then
719755
DD.giveAfflictionCharacter(character, 'wizard', 1)
720-
local item = character.Inventory.GetItemAt(DD.invSlots.head)
721-
item.NonInteractable = true
722-
if SERVER then
723-
local nonInteractable = item.SerializableProperties[Identifier("NonInteractable")]
724-
Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(nonInteractable, item))
725-
end
726-
elseif character.JobIdentifier == 'gangster' then
727-
local item = character.Inventory.GetItemAt(DD.invSlots.head)
728-
item.NonInteractable = true
729-
if SERVER then
730-
local nonInteractable = item.SerializableProperties[Identifier("NonInteractable")]
731-
Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(nonInteractable, item))
732-
end
733-
local item = character.Inventory.GetItemAt(DD.invSlots.innerclothes)
734-
item.NonInteractable = true
735-
if SERVER then
736-
local nonInteractable = item.SerializableProperties[Identifier("NonInteractable")]
737-
Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(nonInteractable, item))
738-
end
739756
elseif character.JobIdentifier == 'assistant' then
740757
Entity.Spawner.AddItemToSpawnQueue(ItemPrefab.GetItemPrefab('handcuffs'), character.Inventory, nil, nil, function (spawnedItem)
741758
spawnedItem.Condition = spawnedItem.Condition / 10

Dam Defense/Lua/DD/luahooks.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,7 @@ Hook.Add("DD.fuelrod.decay", "DD.fuelrod.decay", function(effect, deltaTime, ite
12751275
if item.Prefab.Identifier == 'skyholderartifact' then
12761276
maxAmount = 300
12771277
end
1278+
if maxAmount <= 0 then return end
12781279
maxAmount = maxAmount * multiplier
12791280
local minDistance = 50
12801281
local maxDistance = math.sqrt(maxAmount / 0.005)
7.09 KB
Binary file not shown.
96.2 KB
Binary file not shown.
9.3 KB
Binary file not shown.
6.98 KB
Binary file not shown.
291 KB
Binary file not shown.

Dam Defense/filelist.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<contentpackage name="Dam Defense" modversion="1.2.18" corepackage="False" steamworkshopid="3146664815" gameversion="1.8.8.1">
2+
<contentpackage name="Dam Defense" modversion="1.2.32" corepackage="False" steamworkshopid="3146664815" gameversion="1.9.7.0">
33
<Other file="%ModDir%/CSharp/Client/DamDefense.cs" />
44
<Text file="%ModDir%/Localizations/english.xml" />
55
<Item file="%ModDir%/Items/Jerry.xml" />
@@ -23,8 +23,8 @@
2323
<Jobs file="%ModDir%/Misc/Jobs.xml" />
2424
<Afflictions file="%ModDir%/Misc/Afflictions.xml" />
2525
<Submarine file="%ModDir%/Submarines/DD Demo.sub" />
26-
<Submarine file="%ModDir%/Submarines/DD Olde Towne.sub" />
2726
<Submarine file="%ModDir%/Submarines/DD Cliffhanger.sub" />
2827
<Submarine file="%ModDir%/Submarines/DD Pioneer Point.sub" />
29-
<Submarine file="%ModDir%/Submarines/DD Dimidium.sub" />
28+
<Submarine file="%ModDir%/Submarines/DD Olde Towne.sub" />
29+
<Submarine file="%ModDir%/Submarines/DD Rising Tide.sub" />
3030
</contentpackage>

0 commit comments

Comments
 (0)