-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from SilverSokolova/dev
Dev
- Loading branch information
Showing
9 changed files
with
76 additions
and
102 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
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
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,4 @@ | ||
[ | ||
[{"op":"test","path":"/scripts/0","value":"/npcs/bmain.lua"}, | ||
{"op":"add","path":"/scripts/-","value":"/npcs/sb_outpostcivilian.lua"}] | ||
] |
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
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,14 +1,30 @@ | ||
local ini = init or function() end | ||
local onInteractio = onInteraction or function() end | ||
local sb_onInteraction = onInteraction or function() end | ||
|
||
function init() ini() | ||
script.setUpdateDelta(0) | ||
object.setInteractive(true) | ||
smas = object.smash | ||
toAbsolutePositio = object.toAbsolutePosition | ||
object.smash = function() smas(true) end | ||
object.toAbsolutePosition = function(z) return toAbsolutePositio{z[1],z[2]+1} end | ||
sb_scriptConfig = config.getParameter("spawner.sb_scriptConfig") | ||
|
||
sb_smash = object.smash | ||
object.smash = function() sb_smash(true) end | ||
|
||
sb_toAbsolutePosition = object.toAbsolutePosition | ||
object.toAbsolutePosition = function(z) return sb_toAbsolutePosition{z[1],z[2]+1} end | ||
|
||
world.isVisibleToPlayer = function() return false end | ||
|
||
sb_spawnNpc = world.spawnNpc | ||
world.spawnNpc = function(position, species, npcType, level, seed, parameters) | ||
if parameters and sb_scriptConfig then | ||
parameters.scriptConfig = sb.jsonMerge(sb_scriptConfig, parameters.scriptConfig) | ||
end | ||
parameters.scriptConfig.sb_beamIn = true | ||
return sb_spawnNpc(position, species, npcType, level, seed, parameters) | ||
end | ||
end | ||
|
||
function onInteraction(args) onInteractio(args) update() end | ||
function onInteraction(args) | ||
sb_onInteraction(args) | ||
update() | ||
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
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
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
Oops, something went wrong.