You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Dam Defense/Localizations/english.lua
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -159,6 +159,8 @@ return {
159
159
vipEndNoReward='The VIP is dead! No one has been rewarded for their death.',
160
160
-- events/wizard.lua
161
161
wizardEnd='The wizard has been slain!',
162
+
-- events/chimera.lua
163
+
chimeraEnd='The chimera has been slain!',
162
164
-- console commands
163
165
jobbanNoticeSingular='You have been banned from the {jobName} job because: {reason}.',
164
166
jobbanNoticePlural='You have been banned from {jobName} jobs because: {reason}.',
@@ -255,6 +257,8 @@ return {
255
257
wikiText_wizardEvent='This is a side event where a player is spawned in as a wizard. His objective is to cause chaos and mayhem, although this does not mean the wizard is an antagonist, for he can act good or evil.\nThe wizard spawns with, amongst other items, a staff and some spellbooks. When the staff and a spellbook are both held at once, spells can be cast.',
256
258
wikiName_mercsEvent='MERCS Event',
257
259
wikiText_mercsEvent='This is a side event where a player will be spawned as a member of the Mobile Emergency Rescue and Combat Squad (abbreviated: MERCS). Their goal is to assist security and they are essentially a super cop, even counting as a member of security. They look very similar to the Death Squadders, but have an entirely different objective.',
260
+
wikiName_chimeraEvent='Chimera Event',
261
+
wikiText_chimeraEvent='This is a side event where a player will be spawned as a husk chimera. Their objective is to kill or infect the humans. Like all undead, if the ragdoll key is held, it will enter into a regenerative state.',
258
262
wikiName_electionEvent='Election Event',
259
263
wikiText_electionEvent='This is a side event where you can vote yes to replace the current captain or vote no to keep him! Head to your nearest ballot box, insert your desired amount of Nexcredits (TM) and press "Vote Yes" or "Vote No". Each player once per round can start an election event if there is no ongoing main event or election event by doing "/election".',
260
264
wikiName_withdrawEvent='Withdraw Event',
@@ -350,11 +354,12 @@ return {
350
354
wikiText_mediumsteelcabinetItem='Can fit an entire person inside -- useful for hiding.',
351
355
wikiText_nexshop1Item='This page links to all items which can be bought in a Nexshop (TM).',
352
356
wikiText_nukieshop1Item='This page links to all items which can be bought in a Nukieshop.',
357
+
wikiText_secnexshopItem='This page links to all items which can be bought in a Security Nexshop (TM).',
353
358
-- wiki creatures
354
359
wikiName_spitroachCreature='Spitroach',
355
360
wikiText_spitroachCreature='An annoying cowardly pest that breeds and grows fast. They run up close, spit their acid, run away and repeat, usually in a synchronized group motion. When no targets are in sight, they spit on their walls, causing leaks and trouble. Immune to acid burns.',
356
361
wikiName_huskCreature='Husks',
357
-
wikiText_huskCreature='A diver infected with the Velonaceps Calyx parasite. Contagious and disruptive enemies capable of ending rounds by themselves occasionally due to their infectious nature. After some time has elapsed they will grow into husk prowlers, a stronger and more savage form.',
362
+
wikiText_huskCreature='A human or creature infected with the Velonaceps Calyx parasite. Contagious and disruptive enemies capable of ending rounds by themselves occasionally due to their infectious nature. After some time has elapsed basic husks will grow into husk prowlers, a stronger and more savage form. All undead, including husks, can hold the ragdoll key to enter a regenerative state.',
358
363
wikiName_greenskinCreature='Greenskins',
359
364
wikiText_greenskinCreature='Both Goblins and Trolls appear as green hairless humanoids wearing green clown masks. They are immune to all forms of stun, move swiftly in water, explode upon death, and can also put masks on both living and dead humans to instantly convert them into a greenskin. Goblins are weaker and smaller than humans, but are faster than them, making them effective hit and run fighters when they have stun capability. Trolls, however are slower, tankier and dumber, being unable to use any items, but to compensate have a very powerful melee attack.\nGreenskins spawn with midazolam, methamphetamine, a few goblin masks, and eight (8) goblin crates. Goblins and Trolls can drop goblin crates on the ground to both hide inside of and also heal themselves of regular damage. Midazolam instantly heals and stuns, for more information view its wiki page.',
@@ -330,6 +326,17 @@ DD.eventDirector.startNewEvent = function (isMainEvent)
330
326
end
331
327
localalivePercentage=alive/players
332
328
localdeadPercentage=1-alivePercentage
329
+
330
+
-- calculates the weight of an event
331
+
localcalculateEventWeight=function (eventClass)
332
+
if ((eventClass.tbl.isMainEvent~=isMainEvent) andnot (eventClass.tbl.isMainEventandDD.eventDirector.canMainEventBeRegularEvent)) or
333
+
(eventClass.tbl.minimunAlivePercentage>alivePercentage) or (eventClass.tbl.minimunDeadPercentage>deadPercentage) or (DD.roundTimer<eventClass.tbl.minimunTimeElapsed) then
Copy file name to clipboardExpand all lines: Dam Defense/Lua/DD/events/base.lua
+20-12Lines changed: 20 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ end, {
5
5
paramType= {}, -- correct type for each parameter of the constructor function of this class
6
6
clientKeys= {}, -- keys of properties of this event that are a client or a client list (useful for finding what clients are participanting in an event)
7
7
public=true, -- determines if event will be listed in "/publicevents"
8
+
manuallyTriggered=false, -- if triggered manually by an admin using a command this will be true
8
9
9
10
logClients=function (self, set)
10
11
localtext='{clientName} is a member of the "{eventName}" event ({seed}) under the key "{keyName}".'
@@ -52,18 +53,24 @@ end, {
52
53
localdeadPercentage=1-alivePercentage
53
54
54
55
-- enforce restrictions
55
-
ifself.isMainEventthenself.instanceCap=1end
56
-
if (DD.eventDirector.mainEventCap>=0) andself.isMainEventand (#DD.eventDirector.getMainEvents() >=DD.eventDirector.mainEventCap) then
57
-
self.fail('limit on main events has been reached')
58
-
return
59
-
end
60
-
if (self.instanceCap>=0) and (#DD.eventDirector.getEventInstances(self.name) >=self.instanceCap) then
61
-
self.fail('limit on instances of this event has been reached')
62
-
return
63
-
end
64
-
if (self.minimunAlivePercentage>alivePercentage) or (self.minimunDeadPercentage>deadPercentage) then
65
-
self.fail('minimun alive percentage or minimun dead percentage were not met')
66
-
return
56
+
ifnotself.manuallyTriggeredthen
57
+
ifself.isMainEventthenself.instanceCap=1end
58
+
ifDD.roundTimer<self.minimunTimeElapsedthen
59
+
self.fail('not enough time has elapsed since the round started')
60
+
return
61
+
end
62
+
if (DD.eventDirector.mainEventCap>=0) andself.isMainEventand (#DD.eventDirector.getMainEvents() >=DD.eventDirector.mainEventCap) then
63
+
self.fail('limit on main events has been reached')
64
+
return
65
+
end
66
+
if (self.instanceCap>=0) and (#DD.eventDirector.getEventInstances(self.name) >=self.instanceCap) then
67
+
self.fail('limit on instances of this event has been reached')
68
+
return
69
+
end
70
+
if (self.minimunAlivePercentage>alivePercentage) or (self.minimunDeadPercentage>deadPercentage) then
71
+
self.fail('minimun alive percentage or minimun dead percentage were not met')
72
+
return
73
+
end
67
74
end
68
75
69
76
-- Create hooks
@@ -139,6 +146,7 @@ end, {
139
146
goodness=0, -- for eventDirector
140
147
minimunAlivePercentage=0.0, -- minimun percentage of alive players required when event starts
141
148
minimunDeadPercentage=0.0, -- minimun percentage of dead players required when event starts
149
+
minimunTimeElapsed=0, -- minimun amount of time in seconds elapsed since the round started
0 commit comments