Commit Graph

45 Commits (bce903ee0434ffae24bf02c898ab456adee9ffdf)

Author SHA1 Message Date
Lukas Werling f3b2ff1295 Merge branch 'gamepad-controls' 2016-08-07 18:10:24 +02:00
Clonkonaut b6ca10d11a Constructor library: Changed to search through all available knowledge and filter using an overloadable function.
The hammer will now only construct definitions that have the callback "IsHammerBuidable". This will exclude all C4D_Structure objects that are not buildings and can't be build in a meaningful way.
Also, with the carry heavy branch I want to test adhoc built lorries (lorries as construction sites). Sven suggested this.
2016-06-18 19:45:45 +02:00
Maikel de Vries 1df322b7ff adapt objects and scenarios to new component implementation 2016-05-21 13:34:34 +02:00
Mark 7e74baac55 Refactoring: Construction site takes materials, not the constructor
The functionality of taking construction materials from a clonk and lorries was extracted to a separate function and moved from the constructor to the construction site. This is a little bit of an esthetic decision, but it is also useful for my project that has a spacebar-interaction which takes construction materials from the clonk without the need to open the inventory menu.
2016-03-29 18:56:10 +02:00
Lukas Werling 0afa589286 Replace all usage of "bool released" with "int status" 2016-03-21 18:45:42 +01:00
David Dormagen 28ffc3d3b1 Library_Constructor: use normal single-use instead of holding-use
..because the library wasn't actually USING the holding callback at all. And it had/has its own CON_Aim hackery anyway. No need for the control-library internal CON_Aim stuff then (I could imagine this might just lead to issues at some point).
2016-02-07 10:47:33 +01:00
David Dormagen 7f4f5fee58 added new vocals for three skins (by ala)
They are played e.g. when being hit by stuff, catching fire, killing teammates, idling, trying to put a shovel into the pump, and much more!
2015-12-16 23:01:29 +01:00
David Dormagen cc3452bd0d custom guis: properly scale with font size now
Previously, the em <-> pixels conversion was a hardcoded value. Now the GUI scales with the font size that can be selected in the options.
Sadly, all scales were off since the hardcoded value was too low.
2015-09-06 19:02:31 +02:00
Maikel de Vries d855d41deb construction menu: improvements and sort to value 2015-06-15 21:14:26 +02:00
David Dormagen 196f528201 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/FancyGridMenu.ocd/DefCore.txt
	planet/Objects.ocd/HUD.ocd/GridMenu.ocd/DefCore.txt
	planet/Objects.ocd/Helpers.ocd/Dummy.ocd/Graphics.png
	planet/Objects.ocd/Items.ocd/Tools.ocd/WindBag.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Javelin.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Flag.ocd/Marker.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Flagpole.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c
	src/game/C4Game.cpp
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/landscape/C4Landscape.cpp
2015-06-03 22:32:36 +02:00
Maikel de Vries a93d96a3ca fix use of hammer in front of damaged structures (#1331) 2015-05-25 11:31:23 +02:00
David Dormagen bd04722553 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
	src/game/C4GraphicsSystem.cpp
	src/game/C4GraphicsSystem.h
	src/game/C4Viewport.cpp
	src/gui/C4GameMessage.cpp
2015-01-15 19:57:01 +01:00
Mark 850bf1b9d4 CreateObject/CreateObjectAbove (#1214)
Renamed CreateObject() to CreateObjectAbove() and replaced all occurrences in script files.
Added CreateObject(), the function may need a rewrite though, see comment in code.
Updated documentation
2015-01-11 19:02:03 +01:00
David Dormagen 5565c4401c adjusted construction menu to work with arbitrary resolutions 2014-12-25 17:21:39 +01:00
David Dormagen 6a875a1b29 CustomGuis: renamed several script functions to be more consistent; removed Gui_AddMargin as it is obsolete
All calls that reference an existing Gui window now start with "GuiUpdate" (exception: GuiClose). All other functions are always to be called DURING menu creation and layouting.
The "Margin" property replaces Gui_AddMargin.

find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiOpen/GuiOpen/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiClose/GuiClose/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiSetTag/GuiUpdateTag/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiUpdate/GuiUpdate/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_AddCloseButton/GuiAddCloseButton/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_UpdateText/GuiUpdateText/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_AddSubwindow/GuiAddSubwindow/g'
2014-10-11 11:51:26 +02:00
David Dormagen 5722339e83 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/gui/C4Gui.h
	src/gui/C4GuiDialogs.cpp
	src/gui/C4GuiWindow.cpp
2014-08-13 11:52:41 +02:00
Maikel de Vries bd8f66d470 fixed construction blocking for below surface structures 2014-05-30 10:17:03 +02:00
Maikel de Vries 66f8454b67 allow for constructing just below surface
Useful for basements and maybe also other structures in the future.
2014-05-26 21:28:07 +02:00
Maikel de Vries 4ca1e2e9cb Construction menu now uses GUI_GridLayout 2014-04-09 22:48:06 +02:00
Maikel de Vries c393ba0119 Script menu implementation for constructor library 2014-02-26 18:58:54 +01:00
David Dormagen 06ac00ace8 Merge branch 'master' into Controls
Conflicts:
	CMakeLists.txt
	Makefile.am
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Club.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	src/control/C4Control.cpp
	src/control/C4Control.h
	src/gamescript/C4GameScript.cpp
2014-02-15 14:44:57 +01:00
Tobias Zwick ebd14e2339 fix #1012: Construction removed when all materials available
+ Add localized error message when the underground changed and thus the construction cannot be created
+ Add a SetPosition to ensure the construction site is really exactly at the given position
2014-01-25 16:20:27 +07:00
Gabriel 166c193749 Added new construction site sign graphics.
Each one is unique thanks to the unlimited power of random rotation. Hammer symbol as overlay for better customizability.

Signed-off-by: Tobias Zwick <newton@westnordost.de>
2013-11-11 02:24:20 +07:00
Sven Eberhardt a020cfc867 Fix construction preview of non-flagpole objects 2013-06-22 22:18:31 +02:00
Sven Eberhardt 58a0bf1c24 Flagpole construction: Show arrows pointing to neighboured flags that would be connected if the flagpole were built there.
Allows the player to build his base more efficiently.
2013-06-22 20:01:51 +02:00
David Dormagen 7eaef70af1 Merge branch 'master' into Controls
Conflicts:
	planet/System.ocg/PlayerControls.txt
2013-05-26 18:19:51 +02:00
Martin Plicht a915cdb15f Make Eclipse happy by changing some zeros to nils and stuff 2013-05-26 00:01:08 +02:00
David Dormagen 6c64963f1f hammer (Library_Constructor) now uses correct interface 2013-05-23 23:59:50 +02:00
Bernhard Bonigl b46e40d78e Experimental: Create Construction-Menu at cursor-position 2012-06-18 19:03:50 +02:00
Felix Wagner f77b4134b4 Removed GetConstructionDirection() 2012-05-13 20:54:24 +01:00
Bernhard Bonigl 8bd16da9c4 Added Stringtables to constructing and removed old unused stuff 2012-05-08 20:43:30 +02:00
Bernhard Bonigl c601231960 Added Interaction for flipping construction sites during placement 2012-05-08 20:27:24 +02:00
Felix Wagner e9010b81e9 Construction preview: combining, Elevator: combine two for SUPER elevator 2012-04-22 00:00:41 +01:00
Bernhard Bonigl e8ef7a9537 Made ConstructionSite compatible with dir-flipping-preview
Fixed ConstructionSite not removing on build fail
2012-04-17 18:08:23 +02:00
Bernhard Bonigl 4c38caaf27 Merged default into Controls 2012-04-17 17:37:52 +02:00
Felix Wagner 366d96680a Rotate your buildings in the construction preview using Space! 2012-04-16 16:31:38 +01:00
Bernhard Bonigl b5f099be79 Hardcoded Construction-Site Intersections. 2012-04-15 00:29:38 +02:00
Bernhard Bonigl a687b0f85c Added simple construction-site-blocking check 2012-04-14 23:37:12 +02:00
Bernhard Bonigl a56c684a19 Fixed Construction sites moving containers into them, instead of their contents. 2012-04-14 23:16:17 +02:00
Bernhard Bonigl 6ecb036554 Changed Construction-Sites to be containers where material needs to be put into.
They still construct themselves.
2012-04-02 23:49:39 +02:00
Bernhard Bonigl 093c169a1e Constructions sites removed. You need all ressources on-site to create a construction.
Locations taken into account: Clonk Inventory, stuff lying around, containers/lorries
2012-03-29 22:08:54 +02:00
Bernhard Bonigl 71061c8d4b Allowed movement during construction-preview (for better positioning) 2012-03-28 19:39:00 +02:00
Felix Wagner 98f422a2ac Construction preview for the hammer. 2012-03-27 19:10:44 +01:00
Maikel de Vries 42cfc76a90 Show construction costs for construction menu 2012-01-08 15:22:26 +01:00
Maikel de Vries 7bcb72ab7b Hammer construction menu replaced by drag&drop menu
This to get rid completely of the old menus, there is still work to do on the drag&drop menu though
2012-01-02 03:14:57 +01:00