Skip to content

Commit 634e309

Browse files
committed
release of 0.5.4a
- added previewing-system - added rotation-mode to previewing-system (press R to toggle it) - added ability to toggle the mods state (using H) - updated docs
1 parent cf8c6e3 commit 634e309

3 files changed

Lines changed: 143 additions & 142 deletions

File tree

Data/Scripts/Manager/arc_EventManager.lua

Lines changed: 40 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,65 @@
44
--- The EventManager handles the initialization of the UIManager and shows tutorial messages to the player
55
---
66

7-
architect_usage_has_been_shown = false
8-
97
architect_init = {}
108

119
function showUsage()
1210

13-
if not architect_usage_has_been_shown then
14-
15-
-- create controller for the ingame user-interface
16-
-- Script.UnloadScript("Scripts/Manager/arc_UIController.lua")
17-
-- Script.ReloadScript("Scripts/Manager/arc_UIController.lua")
18-
uiManagerParams = {}
19-
uiManagerParams.class = "UIManager"
20-
uiManagerParams.name = "UIManager_Instance"
11+
-- create controller for the ingame user-interface
12+
-- Script.UnloadScript("Scripts/Manager/arc_UIController.lua")
13+
-- Script.ReloadScript("Scripts/Manager/arc_UIController.lua")
14+
uiManagerParams = {}
15+
uiManagerParams.class = "UIManager"
16+
uiManagerParams.name = "UIManager_Instance"
2117

22-
uiManagerEntity = System.SpawnEntity(uiManagerParams)
18+
uiManagerEntity = System.SpawnEntity(uiManagerParams)
2319

24-
message = "<font color='#333333' size='32'>Architect " .. architect_version .. "</font>" .. "\n"
25-
.. "<font color='#333333' size='8'>\n</font>"
26-
.. "<font color='#333333' size='16'>An advanced base-building modification for kingdom come deliverance.</font>" .. "\n"
20+
message = "<font color='#333333' size='32'>Architect " .. architect_version .. "</font>" .. "\n"
21+
.. "<font color='#333333' size='8'>\n</font>"
22+
.. "<font color='#333333' size='16'>An advanced base-building modification for kingdom come deliverance.</font>" .. "\n"
2723

28-
.. "<font color='#333333' size='18'>\nKey Mousewheel up/down</font>" .. "\n"
29-
.. "<font color='#333333' size='16'>Choose construction</font>" .. "\n"
24+
.. "<font color='#333333' size='18'>\nKey Mousewheel up/down</font>" .. "\n"
25+
.. "<font color='#333333' size='16'>Choose construction</font>" .. "\n"
3026

31-
.. "<font color='#333333' size='18'>\nKey V </font>" .. "\n"
32-
.. "<font color='#333333' size='16'>Create construction</font>" .. "\n"
27+
.. "<font color='#333333' size='18'>\nKey V </font>" .. "\n"
28+
.. "<font color='#333333' size='16'>Create construction</font>" .. "\n"
3329

34-
.. "<font color='#333333' size='18'>\nKey R </font>" .. "\n"
35-
.. "<font color='#333333' size='16'>Rotate new construction</font>" .. "\n"
30+
.. "<font color='#333333' size='18'>\nKey R </font>" .. "\n"
31+
.. "<font color='#333333' size='16'>Rotate new construction</font>" .. "\n"
3632

37-
.. "<font color='#333333' size='18'>\nKey G </font>" .. "\n"
38-
.. "<font color='#333333' size='16'>Remove construction</font>" .. "\n"
33+
.. "<font color='#333333' size='18'>\nKey G </font>" .. "\n"
34+
.. "<font color='#333333' size='16'>Remove construction</font>" .. "\n"
3935

40-
.. "<font color='#333333' size='18'>\nKey O </font>" .. "\n"
41-
.. "<font color='#333333' size='16'>Toggle deletion of entity-lock</font>" .. "\n"
36+
.. "<font color='#333333' size='18'>\nKey O </font>" .. "\n"
37+
.. "<font color='#333333' size='16'>Toggle deletion of entity-lock</font>" .. "\n"
4238

43-
.. "<font color='#333333' size='18'>\nKey H </font>" .. "\n"
44-
.. "<font color='#333333' size='16'>Enable / disable the mod.</font>" .. "\n"
39+
.. "<font color='#333333' size='18'>\nKey H </font>" .. "\n"
40+
.. "<font color='#333333' size='16'>Enable / disable the mod.</font>" .. "\n"
4541

46-
.. "\n"
42+
.. "\n"
4743

48-
--[[
49-
.. "<font color='#333333' size='18'>\nCommands </font>"
50-
.. "<font color='#333333' size='16'>\n"
51-
.. "#setHome()" .. "\n"
52-
.. "#setHome()" .. "\n"
53-
.. "#setHomeName()" .. "\n"
54-
.. "#getHome()" .. "\n"
55-
.. "#showStats()" .. "\n"
56-
.. "#search('bridge')" .. "\n"
57-
.. "#lockAll()" .. "\n"
58-
.. "#unlockAll()" .. "\n"
59-
.. "</font>" .. "\n"
60-
]] --
44+
--[[
45+
.. "<font color='#333333' size='18'>\nCommands </font>"
46+
.. "<font color='#333333' size='16'>\n"
47+
.. "#setHome()" .. "\n"
48+
.. "#setHome()" .. "\n"
49+
.. "#setHomeName()" .. "\n"
50+
.. "#getHome()" .. "\n"
51+
.. "#showStats()" .. "\n"
52+
.. "#search('bridge')" .. "\n"
53+
.. "#lockAll()" .. "\n"
54+
.. "#unlockAll()" .. "\n"
55+
.. "</font>" .. "\n"
56+
]] --
6157

62-
.. "<font color='#333333' size='16'>Execute 'architect_help' in the ingame-console for additional help and an overview of all the available functions.</font>" .. "\n\n"
58+
.. "<font color='#333333' size='16'>Execute 'architect_help' in the ingame-console for additional help.\nUse 'architect_intro' to show this message again.</font>" .. "\n\n"
6359

64-
.. "<font color='#333333' size='18'>Contact - Ideas, Feedback, etc.</font>" .. "\n"
65-
.. "<font color='#333333' size='14'>http://github.com/benjaminfoo/architect/</font>" .. "\n"
66-
.. "\n"
6760

68-
-- create tutorial and show
69-
Game.ShowTutorial(message, 20, false, true)
61+
-- create tutorial and show
62+
Game.ShowTutorial(message, 20, false, true)
7063

71-
architect_usage_has_been_shown = true
64+
architect_usage_has_been_shown = true
7265

73-
end
7466

7567
end
7668

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
1-
currentSpeed = 0
2-
maxSpeed = 5
3-
minSpeed = 0.1
4-
5-
incSpeed = 1
6-
7-
function onUpPressed()
8-
System.LogAlways("OnUP aa")
9-
10-
if (currentSpeed < maxSpeed) then
11-
currentSpeed = currentSpeed + incSpeed
12-
end
13-
14-
System.LogAlways("Current speed: " .. tostring(currentSpeed))
15-
end
16-
17-
System.AddCCommand('onUpPressed', 'onUpPressed()', "onUpPressed!")
18-
System.ExecuteCommand("bind 'w' onUpPressed ")
19-
20-
function onDownPressed()
21-
System.LogAlways("OnDown")
22-
23-
if (currentSpeed > 0) then
24-
currentSpeed = currentSpeed - incSpeed
25-
end
26-
27-
System.LogAlways("Current speed: " .. tostring(currentSpeed))
28-
end
29-
30-
System.AddCCommand('onDownPressed', 'onDownPressed()', "onDownPressed!")
31-
System.ExecuteCommand("bind 's' onDownPressed ")
32-
33-
mechaSlideActive = false
34-
35-
function onSlideUpdate()
36-
37-
if not mechaSlideActive then
38-
return
39-
end
40-
41-
local from = player:GetPos();
42-
from.z = from.z + 1.615;
43-
44-
local hitData = {};
45-
local hits = Physics.RayWorldIntersection(
46-
from,
47-
vecScale(System.GetViewCameraDir(), 250),
48-
10,
49-
ent_all,
50-
player.id,
51-
nil,
52-
hitData
53-
);
54-
55-
if hits > 0 then
56-
-- dump(hitData[1])
57-
58-
firstHit = hitData[1]
59-
60-
p = player:GetPos()
61-
62-
c = System.GetViewCameraDir()
63-
64-
local from = player:GetPos();
65-
from.z = from.z + 1.615;
66-
67-
local hitDownToBottom = {};
68-
local hitsDownToBottom = Physics.RayWorldIntersection(from, { x = 0, y = 0, z = -5 }, 10, ent_all, player.id, nil, hitDownToBottom);
69-
70-
local frontData = {};
71-
camView = vecScale(System.GetViewCameraDir(), 10)
72-
newCamView = {
73-
camView.x,
74-
camView.y,
75-
camView.z
76-
}
77-
local frontHits = Physics.RayWorldIntersection(from, newCamView, 10, ent_all, player.id, nil, frontData);
78-
79-
if (frontHits <= 0) then
80-
return
81-
end
82-
83-
up = {
84-
p.x + c.x * (0.1 * currentSpeed),
85-
p.y + c.y * (0.1 * currentSpeed),
86-
-- p.z + c.z * 0
87-
hitDownToBottom[1].pos.z + 0.1
88-
}
89-
90-
player:SetPos(up)
91-
92-
end
93-
94-
end
1+
-- currentSpeed = 0
2+
-- maxSpeed = 5
3+
-- minSpeed = 0.1
4+
--
5+
-- incSpeed = 1
6+
--
7+
-- function onUpPressed()
8+
-- System.LogAlways("OnUP aa")
9+
--
10+
-- if (currentSpeed < maxSpeed) then
11+
-- currentSpeed = currentSpeed + incSpeed
12+
-- end
13+
--
14+
-- System.LogAlways("Current speed: " .. tostring(currentSpeed))
15+
-- end
16+
--
17+
-- System.AddCCommand('onUpPressed', 'onUpPressed()', "onUpPressed!")
18+
-- System.ExecuteCommand("bind 'w' onUpPressed ")
19+
20+
-- function onDownPressed()
21+
-- System.LogAlways("OnDown")
22+
--
23+
-- if (currentSpeed > 0) then
24+
-- currentSpeed = currentSpeed - incSpeed
25+
-- end
26+
--
27+
-- System.LogAlways("Current speed: " .. tostring(currentSpeed))
28+
-- end
29+
--
30+
-- System.AddCCommand('onDownPressed', 'onDownPressed()', "onDownPressed!")
31+
-- System.ExecuteCommand("bind 's' onDownPressed ")
32+
--
33+
-- mechaSlideActive = false
34+
--
35+
-- function onSlideUpdate()
36+
--
37+
-- if not mechaSlideActive then
38+
-- return
39+
-- end
40+
--
41+
-- local from = player:GetPos();
42+
-- from.z = from.z + 1.615;
43+
--
44+
-- local hitData = {};
45+
-- local hits = Physics.RayWorldIntersection(
46+
-- from,
47+
-- vecScale(System.GetViewCameraDir(), 250),
48+
-- 10,
49+
-- ent_all,
50+
-- player.id,
51+
-- nil,
52+
-- hitData
53+
-- );
54+
--
55+
-- if hits > 0 then
56+
-- -- dump(hitData[1])
57+
--
58+
-- firstHit = hitData[1]
59+
--
60+
-- p = player:GetPos()
61+
--
62+
-- c = System.GetViewCameraDir()
63+
--
64+
-- local from = player:GetPos();
65+
-- from.z = from.z + 1.615;
66+
--
67+
-- local hitDownToBottom = {};
68+
-- local hitsDownToBottom = Physics.RayWorldIntersection(from, { x = 0, y = 0, z = -5 }, 10, ent_all, player.id, nil, hitDownToBottom);
69+
--
70+
-- local frontData = {};
71+
-- camView = vecScale(System.GetViewCameraDir(), 10)
72+
-- newCamView = {
73+
-- camView.x,
74+
-- camView.y,
75+
-- camView.z
76+
-- }
77+
-- local frontHits = Physics.RayWorldIntersection(from, newCamView, 10, ent_all, player.id, nil, frontData);
78+
--
79+
-- if (frontHits <= 0) then
80+
-- return
81+
-- end
82+
--
83+
-- up = {
84+
-- p.x + c.x * (0.1 * currentSpeed),
85+
-- p.y + c.y * (0.1 * currentSpeed),
86+
-- -- p.z + c.z * 0
87+
-- hitDownToBottom[1].pos.z + 0.1
88+
-- }
89+
--
90+
-- player:SetPos(up)
91+
--
92+
-- end
93+
--
94+
-- end

keybinds.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
-- Delete the construction you re currently looking at
1515
# System.ExecuteCommand("bind 'g' deleteRayCastEntityHit")
1616

17+
-- Toggle the edit mode
18+
# System.ExecuteCommand("bind 'r' toggleRotationMode ")
19+
20+
-- Toggle the deletion_lock of an entity
21+
# System.ExecuteCommand("bind 'o' toggleEntityLock ")
22+
23+
-- Enable / Disable the modification
24+
# System.ExecuteCommand("bind 'h' toggleModState ")
25+
1726

1827
-- Advanced
1928
-- Lock the current entity and make it undeleteable

0 commit comments

Comments
 (0)