Commit Graph

116 Commits (6ad42ed24d43c292322217553fa61c981c36906e)

Author SHA1 Message Date
Günther Brammer 9741c1e853 Clonk: Don't play idle animations if Menu is open
At least, in theory. I only removed the plain GetMenu() call because the
engine GetMenu is going away.
2016-01-30 16:03:59 +01:00
David Dormagen 447be6c91d Clonk control: moved "menu" local to "clonk.control.menu"
"menu" is an error prone name in one of the most frequently used/overloaded objects of the planet. Actually, there was a bug in some other thing which disappeared now. So I guess something, somewhere uses the name "menu", too.
Anyway, this is more consistent (because the other control stuff is in this.control, too) and less error prone. So it's a good change regardless of whether it actually fixes an existing bug.
2016-01-29 22:48:59 +01:00
Julius Michaelis 711df05e1a Add button X to fade through half solidmasks.
Enabled on the elevator case for testing.
2016-01-20 18:58:11 +01:00
Sven Eberhardt 729712fa2f Allow use of bucket, pickaxe, bow, club, grenade launcher, javelin and musket during scale/hangle.
Temporarily disables scale/hangle during usage of these items.
2016-01-17 14:31:51 -05:00
Maikel de Vries 5b111131e9 remove unused is wallkick effect 2016-01-17 13:30:01 +01:00
Sven Eberhardt 3dad1c6d81 Turn MaxContentsCount and HandObjects into properties instead of callbacks (Possibly fixes #1553) 2016-01-10 10:41:34 -05:00
David Dormagen a3e4b620b9 reworked interactions (grabbing etc.)
The player interface is now similar to how picking up works. This should increase acceptance. Also it was pretty fucked up before. The action bar is gone.
The script logic is now outsourced into a new library similar to the other stuff.
Objects can overload the selector for the new interaction (see "call elevator case").

Additional issues hit and resolved when working on this:
Shifting a cursor did not cancel certain actions (and there was no callback for that). This is now solved by adding two new callbacks.

Issues hit and not resolved:
Certain interactions (calling an elevator case, flipping a construction) are in some control library. They should be in the respective objects (and shown via callbacks etc.). Meh.
The internal interface (declaring interactions etc) has a few places where proplists are just translated because the properties are called differently. This is also a fuckup (i.e. a.interaction_object = b.Object) where the properties should just have been called the same in all places from the beginning.
The name "Action Bar" is pretty misleading now as it is no bar. But that's not something visible to the players. todo: cleanup.
2016-01-02 13:02:45 +01:00
David Dormagen 7fce9071e3 lower interaction priority of dead Clonks 2015-12-29 18:28:23 +01:00
David Dormagen d7b2ef9f75 prevent clonk idle animation when in dialogs and reduced frequency of idle sound (#1506)
This doesn't work for intros, though, because they use simple messages. We should unify the systems to only have one dialogue system that uses new-style-menus and implement required features in those menus..
2015-12-20 19:17:34 +01:00
Maikel de Vries 285288546c allow wall jump from rope ladder 2015-12-08 17:22:13 +01:00
David Dormagen eb2b18457e roll: only roll while direction key is held down
This means that you start a roll currently with walking left/right and tapping [down]. OR falling a great height and just holding left/right when landing. When you let go of left/right, you will instantly walk again. This reduces the possibility of the players rolling into an abyss.
2015-11-14 14:58:02 +01:00
Sven Eberhardt 789f910213 Clonk 'use' control: Fix nil pointer access when target object of shelved action removes itself. 2015-10-22 23:58:15 -04:00
Clonkonaut e8ecdb0251 Fix interaction bar hotkeys. 2015-10-11 16:38:33 +02:00
Clonkonaut 9f7b2fc007 ActionBar: Show description for ACTIONTYPE_EXTRA. 2015-10-06 15:08:50 +02:00
David Dormagen cfa0d61e98 inventory: do not immediately pick up again when dropping via shift+throw 2015-09-22 18:22:17 +02:00
David Dormagen aca1bcce34 clonk: disable rolling when stuck 2015-09-20 17:53:05 +02:00
Sven Eberhardt bf1596a229 Adjust interaction menu object ordering.
The clonk opening the menu should always have higher priority so the clonk is predictably selected on the left side even if standing behind e.g. a crate.

Other clonks should be behind because interaction with them is rare but having your fellow players stand in front of a building is very common. Allies also tend to run in front just when you opened that menu.
2015-09-15 21:13:53 -04:00
Sven Eberhardt 4b29c83477 Pass coordinates to ControlThrow. 2015-09-13 13:09:28 -04:00
Sven Eberhardt 0e085e435b Add ControlThrow callback into objects that want to implement custom throwing or even non-throw actions on the throw key. 2015-09-13 13:04:18 -04:00
David Dormagen 673243c9dd properly handle QueryRejectDeparture everywhere (#1382) 2015-09-11 21:08:38 +02:00
Maikel de Vries 358d282ec2 do not perform QueryRejectDeparture when pressing movement keys 2015-09-11 19:04:50 +02:00
David Dormagen a27888a623 the Clonk now performs a roll when pressing [down] (even when walking)
People have complained that the implicit roll (if you don't know how it worked) could lead to death and severe injury. The roll is now explicit. Always and everywhere.
It doesn't have any other effect though; todo: reduce hit area and/or squash vertices of Clonk during roll
2015-08-07 16:12:41 +02:00
Maikel de Vries 91cd15c40c reimplement alt use on right mouse button
This replaces throwing then controlling or inside a vehicle, throwing items remains on RMB as is.
2015-06-28 09:44:50 +02:00
Maikel de Vries 2e0bde2a1c fixed interaction for construction site and chest 2015-06-07 12:28:22 +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
David Dormagen 7d1d70f017 removed NoCollectDelay from engine; it's now handled by script
Which allows a lot more fine-grained controls as all the control and UI stuff is now also in script anyway.
2015-03-26 12:23:20 +01:00
David Dormagen 379d189787 now always use on leftclick and throw on rightclick (drop if you click your Clonk or below); also removed some old references to the right mouse button (UseAlt) 2015-03-09 13:33:31 +01:00
Sven Eberhardt bcd821a786 Fix construction menu opened at wrong position. (#982).
It was always opened at the last mouse position of the owner of the hammer. Fixed it to use the controlling player instead.
2015-02-08 13:31:51 +01:00
Maikel de Vries 1336bb36ee libraries clean-up: remove graphics and clean defcores 2015-02-06 19:44:22 +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 bc9697ab3a worked on making the order of items in the interaction menu and action bar more consistent; changed some minor things 2015-01-03 15:32:06 +01:00
David Dormagen d73799ab07 when a currently-used object is suddenly deleted, the usage is quickly cancelled (#899) 2014-12-25 18:04:19 +01:00
David Dormagen f89b8c8319 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Environment.ocd/Cloud.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/DefCore.txt
	planet/Objects.ocd/Libraries.ocd/PowerConsumer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/PowerProducer.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/System.ocg/ClonkControl.c
	src/gui/C4MouseControl.cpp
	src/landscape/C4PXS.cpp
2014-12-25 15:24:19 +01:00
Maikel de Vries c6802b8776 increase game content version entries to 6.0 2014-12-12 22:58:16 +01:00
Maikel de Vries 856e37a360 fix c4script error in clonkcontrol library 2014-10-28 18:01:59 +01:00
Maikel de Vries 1d34c12431 fixed underwater dropping of second hand item (#1155) 2014-10-18 12:00:49 +02: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
Sven Eberhardt fe59448c5d Reset cursor view on UnGrab control.
This is to reset the view e.g. after controlling a switch.
2014-10-03 22:34:35 +02:00
Sven Eberhardt 6766ac1526 Prevent NPCs from accidentally collecting things. 2014-09-21 16:18:43 +02:00
David Dormagen 89878f64ab Clonks can now exit things and do both interactions if an object can be grabbed and entered 2014-03-31 20:46:51 +02:00
David Dormagen 0da9293686 allow Clonk::SetMenu to also take a custom GUI ID; cleaned up some menu-related mess (like not handling unclosable menus correctly) 2014-02-26 12:03:27 +01:00
David Dormagen 6d3c42b5b1 added callbacks QueryRejectDeselection and QueryRejectDeparture
removed internal variable Clonk.inventory.forced_ejection (hand never selects next item when throwing now)
2014-02-15 14:32:53 +01:00
David Dormagen 6a04337f7c intermediate changes [TO AMMEND] 2014-02-15 14:32:42 +01:00
Sven Eberhardt f12fe2a24a Call MaxContentsCount using this->MaxContentsCount() to allow runtime overload 2013-12-30 13:46:34 +01:00
David Dormagen 7eaef70af1 Merge branch 'master' into Controls
Conflicts:
	planet/System.ocg/PlayerControls.txt
2013-05-26 18:19:51 +02:00
Tobias Zwick 8f752d1d9e clean up files, make non-transparent textures high-quality JPEGs 2013-05-26 16:48:12 +02:00
David Dormagen 0c23d1b9a6 reimplemented the action bar to use the custom GUIs
action bar now only shows shortly after hitting Interact
2013-05-26 14:59:19 +02:00
David Dormagen 2bf88cea5f Clonks' max contents count reduced from 7 to 5 2013-05-24 23:22:16 +02:00
David Dormagen e6487533c2 added first version of object information dialogue on right-click 2013-01-30 21:27:09 +01:00
David Dormagen 299cc7e478 when not able to execute an Use-command (f.e. shield when not walking), the command is remembered and executed when possible 2012-12-29 18:42:19 +01:00