Commit Graph

547 Commits (master)

Author SHA1 Message Date
David Dormagen 1bd3354086 contents menu: changed stacking logic (#1424)
Objects now stack iff CanBeStackedWith returns true. The displayed symbol is now the first object of the stack (instead of the definition).
Also fixed barrel to not overwrite the custom name just after setting it.
2015-10-17 12:09:35 +02:00
David Dormagen fcf1d0d843 script guis: added tooltip for default "close" button 2015-10-14 11:22:06 +02:00
David Dormagen 4964fb11ce shift+click support: used undocumented GetPlayerControlState instead of own memory for key state
One of Sven's private functions. I also renamed the control to CON_ModifierMenu1 (from CON_ModifierInventory1), because it's actually supposed to be the menu modifier in general - even if it's mapped on the inventory key.
2015-10-10 00:52:43 +02:00
Sven Eberhardt d136dc22c0 Implement landscape inflammation.
It used to create the non-existent FLAM objects from the engine. Use a script callback to a global function that creates Flame objects instead.
2015-10-09 16:24:16 -04:00
David Dormagen b9420ce68c added shift+click support for menus
Or more generally: added support for any modifier key for any other command without the requirement to define a new command based on the old one plus the key. This can be helpful in situations where the player commands are decoupled from the script engine control handling (e.g. with menus).
Currently Shift+Click is only used by the inventory menu to transfer all items of a certain kind.
2015-10-09 13:14:27 +02:00
Clonkonaut acec73dd51 New global const FIRE_LIGHT_COLOR. Added fire light color to various objects. 2015-10-07 23:26:03 +02:00
David Dormagen 1354c0fd91 split ProjectileHit up into three functions
This better reflects what the function does. "ProjectileHit" was never used solely for projectiles. Neither was everything of that callback ever needed in all places, which resulted in weird flag-parameter hacking and OnStrike-callbacks. Splitting this up also allows customizing different parts of the behavior further (i.e. tumbling) without adding a hundred parameters or flags to the original function.
2015-10-07 07:25:24 +02:00
Sven Eberhardt cc5d43d0b0 Localize loading message for scenario local player control definitions. 2015-10-05 22:38:45 -04:00
Sven Eberhardt 737b1fd8fd Save screenshots in background thread (#998, #1104).
Also ensure music keeps streaming while collecting data for full map screenshot.
2015-09-29 20:48:34 -04:00
Sven Eberhardt ad6a1dfda6 Fix script error on explosion with size zero. 2015-09-26 17:19:24 -04:00
Maikel de Vries 4c66cc4ad7 change time interface to remove connection between System.ocg and Objects.ocd 2015-09-22 23:31:17 +02:00
David Dormagen 745f452afb inventory: allow dropping the hand item on Shift+Throw 2015-09-21 14:21:57 +02:00
David Dormagen 0409f03a17 inventory control: allow picking up all items on shift+up 2015-09-20 18:27:19 +02:00
Sven Eberhardt 95da770892 Move GetDefWidth and GetDefHeight script functions to engine.
They started to appear in script profiler runs and the GetDefVal-implementation is very inefficient.
2015-09-19 21:22:55 -04:00
Clonkonaut 6a9ef8b961 New: Cotton, Cotton Seed, Cloth, Seed Library 2015-09-18 19:44:49 +02:00
Sven Eberhardt 410e570b94 Add localized strings for ToolsDlg foreground and background labels. 2015-09-17 22:30:22 -04:00
Clonkonaut aadbe20f5c Fixed null pointer error in growth effect.
When using negative values for growing (shrinking).
2015-09-17 23:56:44 +02:00
Sven Eberhardt 30a8ef7f0e Store allow_fire parameter of invincibility effect. 2015-09-16 23:30:23 -04:00
Sven Eberhardt aaf5693ecc Remove unnamed controls from control config dialogue. 2015-09-15 20:04:08 -04:00
Sven Eberhardt d1862e0531 Incinerate returns false when effect could not be created.
Happens e.g. if object has a NonFlammable or Invincible effect.
2015-09-14 22:31:51 -04:00
Sven Eberhardt 188b79cd7a MakeInvincible includes MakeNonFlammable by default.
It was always either used in conjunction or forgotten. If someone wants invincibility while still allowing fire (e.g. an unkillable fire golem), there's now a parameter to allow it.
2015-09-14 22:25:27 -04:00
Mark 722a5ad448 Explode: DoShockwave
Added the global function DoShockwave. Updated documentation. Changed the way explosions deal damage: Every object at the center of the explosion gets full damage. Every object inside the explosion radius gets half damage.

(cherry picked from commit 22298a6d1389b5344ebe7aea56f3c371b5ad845f)

Conflicts:
	planet/System.ocg/Explode.c
2015-09-13 13:01:28 +02:00
Mark 15056b823f Explode: Damage override
Added damage override parameter to the explosion functions. Updated the documentation as well.

(cherry picked from commit 59f802c2d3f269d54c12489ac9659ee3ca57a857)

Conflicts:
	planet/System.ocg/Explode.c
2015-09-13 13:01:24 +02:00
Mark 055196155f Explode: if-order
Merged the three if-blocks in DoExplosion() into one if-block. If there was no container in the first if, there should be no container in the following calls.

(cherry picked from commit d504b1109de115f507a09e9e895104bd9552ac53)
2015-09-13 13:01:20 +02:00
Maikel de Vries ad95a39a1c prevent bubble from growing infinitely large 2015-09-11 23:15:23 +02:00
David Dormagen 51bc8dd54d made CastObjects not throw an error when an object removes itself in Construction
It obviously does not throw the object either, though.
2015-09-11 19:08:10 +02:00
Sven Eberhardt 3723024e2f Added implicit layer check to local calls of FindObjects-family functions (#1383).
Also fixed some docs links. Note that GetObjectLayer and SetObjectLayer are still not documented.
2015-09-09 20:19:45 -04:00
Maikel de Vries 01fb44fd49 fix script error when shifting cursor with zero crew members 2015-09-07 16:55:08 +02:00
Maikel de Vries b20ec03832 prevent script error for Loc_Area(nil) call 2015-09-06 11:24:43 +02:00
David Dormagen fa40cfd64d put zooming on Ctrl+MouseWheel (from Shift+MouseWheel)
Shift is now the inventory key. Shift+MouseWheel sounds like it does have some potential, too. (F.e. scrolling through the ammunition in a bow?)
2015-09-05 11:36:27 +02:00
Sven Eberhardt 84fbff95a8 Add Find_Property. 2015-09-02 23:55:45 -04:00
David Dormagen c3c243d31e collection: utilize new key combination functionality; also put collection on shift
Shift instead of Ctrl is more consistent with dropping items, which is on Shift+Number. Incidentally you can now also decide to drop an item to make space for a new one DURING the collection process. Really rather rad.
2015-09-02 23:21:06 +02:00
David Dormagen ac738735b2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Vehicles.ocd/Airplane.ocd/Script.c
	src/game/C4Game.cpp
	src/game/C4GraphicsSystem.cpp
	src/gamescript/C4GameScript.cpp
2015-09-02 08:19:34 +02:00
David Dormagen e9a69c4252 collect objects solely via CTRL now
The player can also choose which object to collect by holding CTRL and navigating left/right.
2015-08-30 20:39:50 +02:00
Julius Michaelis 2a9b481087 Add a new variant of vehicle that can be passed from below but be walked on from above. 2015-08-30 22:19:36 +09:00
Sven Eberhardt 44a396497c Fix tree growth in skylands scenario (#750) and rework alt tree texture.
Tree growth now implemented using an overload of the grwoth function. Also made the alternate tree skin in skylands a bit more colorful
2015-08-27 23:29:06 -04:00
David Dormagen 0d102d2184 explosion: fix nil-pointer when object removes itself on death
After doing damage to an object, you cannot be sure that the object persists. It might have been blown to smithereens. So, catch that case.
2015-08-20 13:47:27 +02:00
David Dormagen b3f81ef3ed increased lava damage
The lava now does not only do the damage via the fire system but also does some direct damage. Further increasing it might be good. Test it now.
2015-08-16 23:14:16 +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
David Dormagen 36544bd56c Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c
	planet/Objects.ocd/Vegetation.ocd/Branch.ocd/Script.c
	planet/Objects.ocd/Vegetation.ocd/Trunk.ocd/Script.c
	planet/System.ocg/FindLocation.c
2015-08-02 19:24:04 +02:00
Sven Eberhardt ed2e56c3fa Fix Loc_Space and allow direction parameter instead of just horizontal/vertical.
The old implementation was buggy as it would disallow the location if it had too much space (and PathFree2 returns nil). It also doesn't make sense to ask for a location that has space in either direction of a dimension because the location is not automatically adjusted to lie at the center of that space. For example, it would effectively cause fish to spawn directly at walls sometimes.
2015-07-31 00:42:01 -04:00
Sven Eberhardt 0d48105b46 Added shape library.
Also fixed some coconut tree reproduction issues.
2015-07-31 00:42:01 -04:00
Clonkonaut cdb4a1b153 Convenient wrapper for Environment_Time: HasDayNightCycle, SetTime, GetTime, IsDay, IsNight 2015-07-23 12:58:19 +02:00
Maikel de Vries 73fb8cf5e1 add RandomElement function to get a random element from an array 2015-07-20 18:11:16 +02:00
Sven Eberhardt 00e2e10e33 Fix GetSurfaceVector when called near a surface.
Parts of the function still assumed the old proplist result format.
2015-07-18 20:45:39 -04:00
Clonkonaut c7c970822d Added Rectangle_IsInside
Checks whether a given position is inside a given rectangle.
2015-07-14 23:26:26 +02:00
Maikel de Vries f492aa5e71 FindLocation: implement material val check and wall check conditions 2015-07-12 22:18:43 +02:00
Mark ecb24dc927 CastObjects: Array
CastObjects returns an array now, so that further function calls can be issued on the created objects.

(cherry picked from commit 184943fe6f720ba26402764bb3b182d550370e74)
2015-07-11 17:48:14 +02:00
Mark a6bab72499 Vector Library conformity
GetSurfaceVector() and the Coral object now use the array format of the vector library for vectors, instead of proplists.

(cherry picked from commit 03f644e56cdc99a84df57451ed1bac361c0c896d)
2015-07-11 17:47:56 +02:00
Sven Eberhardt 9042450399 Fix DoExplosion from global context.
Avoid null pointer and do play sounds.
2015-07-09 01:03:34 -04:00
Sven Eberhardt fe46689d3e Make ExplosionEffect function overloadable. 2015-07-08 15:55:33 -04: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 f69edf3274 add GetPlayers and GetPlayerByID to loop more easily over players 2015-06-17 23:12:40 +02:00
Maikel de Vries 6d096f608d add Find_Team as FindObject criteria 2015-06-17 20:15:24 +02:00
Maikel de Vries 80c7dbe674 add functions to correctly retrieve the object's current shape 2015-06-08 21:06:18 +02:00
Maikel de Vries 126ae5b179 fix C4Script runtime error in ShiftCursor 2015-06-05 19:16:43 +02:00
Maikel de Vries 3580605ba2 fix ToEmString and introduce ToPercentString for GUIs
The previous implementation could not handle value = -1 and factor = 10 or value = 1 and factor = 100, nor factors which are not powers of ten.
2015-06-05 12:06:02 +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 a0f95c0e93 add global function to get players in a team 2015-06-01 18:52:58 +02:00
Maikel de Vries a9cd57eae8 remove logging message in Explode() 2015-05-17 14:12:49 +02:00
Maikel de Vries 42a7f03788 kill tracing for incinerated dynamite (box) and iron bomb 2015-05-17 14:01:26 +02:00
Maikel de Vries 03b049b0ca add cause_plr to OnShockWaveHit callback
This can be used to damage and kill tracing for objects which die, receive damage or are destroyed on shockwaves.
2015-05-16 21:16:01 +02:00
Maikel de Vries 0157e7b496 remove obsolete BuildTurnTo defcore entry 2015-05-11 21:47:55 +02:00
Sven Eberhardt 21500a81a9 Fix pump to clear the last row of pixels (#1057) and allow pumping from pump without source pipe.
ExtractMaterial has been changed to be able to slurp in from the most distant horizontal position rather than the closest to the extraction top center.

Also speed up ExtractMaterial for the common case of no required horizontal shifts.
2015-05-01 18:13:41 +02:00
Sven Eberhardt 116a5b4ae6 Add Find_InArray (#1073). 2015-04-28 18:59:50 +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
Maikel de Vries 85c2173404 fix script error for the fire effect 2015-03-23 19:50:29 +01:00
David Dormagen df56689946 added Armin's particle fire
http://forum.openclonk.org/topic_show.pl?tid=3070
Only some optimizations have been added.
2015-03-22 10:22:15 +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 90cca08d63 Add /todo message board command.
Adds text to local TODO.txt file. Useful for taking notes quickly e.g. when testing new scenarios in a network game.

TODO filenames are configurable. Default file is TODO.txt in the scenario file (if it's unpacked) and TODO.txt on the current path if access to the first location failed.
2015-03-05 16:04:07 +01:00
Maikel de Vries ba9a5fd757 fix fire spreading (#1276) thanks to Armin 2015-02-18 21:52:39 +01:00
Maikel de Vries 1687b34fd3 fix script runtime error in fire effect when object is deleted on incineration 2015-02-17 20:55:17 +01:00
Günther Brammer a92c22a7b3 Merge various build system fixes and cleanups 2015-01-25 18:50:29 +01:00
Sven Eberhardt 7e45475cbe Scenario saving: Concatenate multiple equal calls to CreateContents. 2015-01-18 14:28:10 +01:00
Sven Eberhardt d33dfd6c55 Scenario Saving: Select between CreateObject/CreateObjectAbove and fix some unnecessery property saving issues.
* CreateObject for goals/rules/environment, rotated, contained and earth objects
* Allow properties to overwrite default behavior of CreateObject vs CreateObjectAbove
* Random initialization of seaweed phase instead of saving it
* Do not save color of ColorByOwner objects that have their owner color
* Fix block spacing between objects of same type if objects of different type occur inbetween but are not saved
2015-01-17 17:00:58 +01: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
Maikel de Vries 91cd68d641 improve explosions propagating inside containers
This fixes the double damage done to containers and iterates through all parent containers until one is found which contains the blast
2015-01-15 17:46:54 +01:00
Maikel de Vries 4ea0cb0ca6 make ContainBlast a property instead of DefCore entry 2015-01-15 17:46:53 +01:00
Mark f9369f9eb4 Different implementation of CreateObject() (#1214)
CreateObject() now does not reposition an object after it has been created, but rather grows it around the center of said object.
To that end a new parameter has been added to DoCon() and SetCon() and the documentation has been updated.
2015-01-13 21:03:27 +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
Maikel de Vries 2d741dfb70 fixed mixed up variables in Loc_Wall() 2015-01-07 00:04:44 +01:00
Tobias Zwick 7e570c05b4 improve the smoke trail and fireworks with the new particle system a bit 2015-01-04 22:09:02 +01:00
Tobias Zwick 0993b3e2a2 change shake strength by distance calculation the same as for audibility 2015-01-03 23:25:28 +01:00
Tobias Zwick b64d379579 tweak fadeoff of the shake effect 2015-01-03 22:53:01 +01:00
Tobias Zwick 659a697cf2 fix ShakeViewport effect, especially for explosions
* The shake effect used to have a target object, which made it vanish as soon as it is removed (and on Explode, it is immediately). So, the shake was never visible. The shake effect is now global and manages all shakes currently on the landscape
* Additionally, if there are several explosions that cause a shake, they were not added up correctly
2015-01-03 22:53:01 +01:00
Sven Eberhardt 98093961ec Add packet logging option.
This should reduce log spam in network games.
2015-01-03 18:15:41 +01:00
Günther Brammer 3bb75fabf1 Remove unused language strings from Language*.txt 2015-01-01 22:13:56 +01:00
Sven Eberhardt 2b997b994a Add light effect to explosions.
Currently, all players see the light. In the future, we may want limit it to the controller of the explosion.
2014-12-31 13:36:22 +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
Tobias Zwick 4981182cf8 Merge remote-tracking branch '_origin/master' into lights
Conflicts:
	src/c4group/C4Components.h
2014-12-15 21:16:40 +01:00
Nicolas Hake 6c2995fe41 Squelch varargs warnings in System.ocg
The engine (extra)warns whenever you use Par() or ... inside of a
function that is not declared as taking a variable number of arguments.
Change the declaration of all System.ocg varargs functions so it is
immediately obvious.
2014-12-12 23:27:17 +01:00
Maikel de Vries c6802b8776 increase game content version entries to 6.0 2014-12-12 22:58:16 +01:00
Armin Burgmeier 192dddec6f Use the new shader system for rendering sprites
This now also avoids the use of conditionals in shaders by using different
shaders instead.
2014-11-24 14:51:08 -05:00
David Dormagen 48bc48159e Script GUIs: fixed last remaining old method names 2014-10-23 23:28:06 +02:00
Maikel de Vries b5a84eba87 move TransposeArray to System.ocg functions 2014-10-19 10:49:12 +02:00
Sven Eberhardt d80ef4ae5e Fix nil pointer if a dragged object is deleted between control creation and control execution. 2014-10-18 01:22:47 +02:00
David Dormagen c09e9880e2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
2014-10-13 18:54:05 +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
David Dormagen 049088be78 CustomGUIs: major rework of layouting & controls; better integration of C4GUI 2014-10-11 11:29:02 +02:00
Armin Burgmeier e5d1182cce Add the Anim_RDir AVP 2014-10-09 17:11:13 -04:00
Armin Burgmeier e4ad7ddc2d Rename Anim_RDir to Anim_AbsRDir 2014-10-09 17:07:52 -04:00
Armin Burgmeier 9fb0cdbdef Add a min_rdir parameter to Anim_RDir 2014-10-09 17:05:24 -04:00
Armin Burgmeier cbdc6040e7 Add the Anim_Dist AVP 2014-10-09 17:00:26 -04:00
Sven Eberhardt ca64fad8b5 Fix lobby team distribution settings hotkeys (#1133) 2014-10-09 20:40:01 +02:00
Nicolas Hake 67c0deae38 Remove leading + from IDS_MSG_AUTOFRAMESKIP DE translation (Github #2) 2014-10-06 16:03:11 +02:00
Sven Eberhardt 3fb86e9ea9 Fix null pointer exception when objects are removed in response to a hit callback. 2014-10-03 21:57:38 +02:00
David Dormagen 952f06b173 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
2014-09-29 11:47:09 +02:00
Sven Eberhardt b899e8944c Base variable naming in scenario saving on saved object count of same type name instead of object number.
This should yield shorter, more predictable names reducing changeset size when an Objects.c file is updated.
2014-09-22 19:21:25 +02:00
Sven Eberhardt 4d36f3a2d2 Some missions fixes/adjustments
* Plane with same color in all missions
* Sequence multiplayer fix
* Heavy smoke is a particle parameter
* Goal graphics fix
* Fix rocky pick direction after dialogue initiation from left
* Dialogue supports sections
* Hat moved to decoration for other missions
2014-09-21 16:36:05 +02:00
Maikel de Vries 03c88c34a3 removed WebCode from league string 2014-09-19 20:55:11 +02:00
Sven Eberhardt 6569a47e37 Change MessageWindow (i.e. the default goal messages) to use decorated messages instead of menus.
Currently, it opens a small window in the bottom right corner which blocks all player control and is not intuitive how to close. Now it's a message that will automatically disappear after a while (If the player hasn't finished reading, he can just click the goal icon again).
2014-08-21 19:55:32 +02:00
Sven Eberhardt cbb321307f Scenario saving fixes: Layers, fishes, sproutberries.
Do not save sprout berries that are still attached to sprouts. Omit some unnecessary properties for fishes.
2014-08-14 17:18: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
Sven Eberhardt b1db0c7918 (Re)implement text completion in dialogue text windows as an async control. Default to Space, i.e. MenuOK. 2014-08-10 20:58:26 +02:00
Sven Eberhardt 834566cf5e Make smoke a bit smaller.
It somehow got really large and weird since the particle changes.

It could still get some polishing, but at least it's a bit less annoying now.
2014-07-21 17:28:11 +02:00
Sven Eberhardt 5cd9b915b0 Added some dialogue functions and speaker portraits. UpdatedAddMenuItem and CustomMessage to allow more customization for picture graphics.
I would prefer to render the models for speaker portraits directly. However, it seems like it's not currently possible to clip or render models to offscreen surfaces.
2014-07-05 15:25:30 +02:00
David Dormagen 6217a84f0b added GetSurfaceVector() to Math.c which can be used to get informations about the surface of the landscape at some point (f.e. for bouncing projectiles) 2014-06-27 20:46:48 +02:00
David Dormagen fb1ee2f88f the Trans_* mesh-transformation-functions are now implemented in the Engine instead of System.ocg 2014-06-27 20:36:47 +02:00
Maikel de Vries 7737759ffb fix ShuffleArray() function 2014-05-19 20:20:20 +02:00
Sven Eberhardt 91c2d49d2a Remember league login name and password token.
Also removed some CUID/Webcode authentification code from engine.
2014-05-18 15:10:00 +02:00
Sven Eberhardt 45f69abb6e Revert engine-side league localization
The engine cannot know about all future league strings. Instead, localize server-side using language id from http request.
2014-04-27 15:42:47 +02:00
Sven Eberhardt 50a5862b7a Store modified mesh material assignments in saved scenarios. 2014-04-18 14:20:10 +02:00
Maikel de Vries c70c44387f Fix some DoDamage issues
Fire.c use correct number of parameters
Axe.c implemented FX_Call_DmgChop according to documentation
2014-04-06 17:15:13 +02:00
Julius Michaelis e5b7ef5b80 AutoFrameSkip: Graphics option to reduce lag by slow
Skips drawing every second frame if drawing the previous frame was too slow
Setting is controlled by game host
Default: on

Imported from Clonk Rage

From e6e680f49ac50a352e9a051ee21622e7f00648b6 Mon Sep 17 00:00:00 2001
From: sven2 <sven2@786b8e90-9c09-0410-89a9-bccc6ef1e79b>
Date: Sat, 21 Sep 2013 21:34:44 +0000
Subject: [PATCH] + AutoFrameSkip: Graphics option to reduce lag by slow
 clients in network games

git-svn-id: https://www.clonk.de:83/svn/clonk/stable@14501 786b8e90-9c09-0410-89a9-bccc6ef1e79b
2014-04-03 14:53:12 +02:00
David Dormagen 5c17b48bc2 Merge branch 'master' into Controls 2014-03-26 23:58:24 +01:00
Julius Michaelis c49bc99efe Options/Graphics: tidy up
Remove Config.Graphics.ShowAllResolutions
2014-03-17 22:29:39 +01:00
Nicolas Hake 01d5507c22 lang/de: Don't use 'ü' as accelerator
Taking over a player had the 'ü' key assigned as accelerator. Since that
doesn't work anyway, switch to a more conservative 'n'.
2014-03-11 00:30:34 +01:00
Nicolas Hake 7a65ebade8 Warn on unsupported accelerator keys
Chars outside the basic latin alphabet don't actually work as
accelerator keys. Emit a warning when encountering them.
2014-03-11 00:26:13 +01:00
David Dormagen 537846d76d menus: fixed two possible null-reference errors 2014-02-28 22:39:14 +01: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 4346da8e4e custom GUIs: replace position properties X/Y/Wdt/Hgt with Left/Right/Top/Bottom that take strings instead of arrays, also change absolute unit from pixels to em
Before you'd define the X coordinate of the top-left corner of a window with X = [500, -40], now you do Left = "50%-4em". The em values currently do not scale with font-size yet, but it is important to do the formal change as early as possible to not have to do all work twice. Scaling of font and thus menus can be implemented later.
2014-02-17 15:46:36 +01:00
David Dormagen fa4638d6c0 custom GUIs: change order of arguments of GuiAction_SetTag from (target, id, tag) to (tag, id, target) 2014-02-16 17:18:34 +01:00
Tobias Zwick 3a8c8d7c3b selecting the clonks via hotkey was all backwards (#1031)
e.g. pressing ctrl+3 selected 1st clonk if there are 3 in the crew
2014-02-16 13:15:07 +07:00
David Dormagen a0a76c051d custom GUI: removed "CreateCustomMenu" which was only a wrapper for "CreateObject" - use "CreateObject" now
This should reduce the confusion about why the function behaves so differently from Gui_Open: the style objects only provide an interface for those easy GUIs, they are not really part of the GUI system.
2014-02-15 18:59:33 +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
David Dormagen a91d62f36a renamed Menus.c to CustomGUIs.c to be consistent with the other (already renamed) parts 2014-02-15 14:40:10 +01:00
Tobias Zwick e1cff59418 fix statistics in player selection dialogues ignore linebreaks (#1027)
I was unable to find the original commit that might have caused this, so I passed the constructor of the TextWindow an extra parameter to treat "|" as linebreaks and changed the translation files.
2014-02-03 01:11:05 +07:00
Tobias Zwick 1e359bddf9 fix typo in english translation 2014-02-01 19:51:42 +07:00
David Dormagen 425a221aff adjusted some particles (f.e. smoke slightly brighter, foundry more subtle)
see http://forum.openclonk.org/topic_show.pl?pid=25749#pid25749 for further information
2014-01-25 15:51:05 +01:00
Sven Eberhardt 55083802b5 Updated SaveScenarioValueToString to recurse into arrays and allow custom save names for defs/proplists 2014-01-22 20:28:41 +01:00
Sven Eberhardt 21c132d2cb Fix StaticSaveVar saving to save string, not object pointer. 2013-12-30 12:24:41 +01:00
Sven Eberhardt 0db19586c8 Save StaticSaveVar as property in Objects.c
Otherwise, you'd have to re-set it every time you edit objects files in the editor.
2013-12-30 03:09:13 +01:00
Sven Eberhardt 49b2c75475 Added helper function Particles_Colored - creates a colored version of a base particle. 2013-12-29 15:08:52 +01:00
Sven Eberhardt 5094cc5c1b Reworked "Save as scenario" option in editor to write a script file instead of Game.txt. 2013-12-27 17:10:09 +01:00
Tobias Zwick ac4ac04558 Merge branch 'master' of ssh://git.openclonk.org/openclonk 2013-12-18 12:48:14 +07:00
Tobias Zwick db6a31cc7a add localized error for each player that could not be loaded (#693) 2013-12-18 12:47:08 +07:00
David Dormagen a10c9316ef renamed DynamicParticles* to Particles* and CreateParticleEx to CreateParticle 2013-12-17 22:32:01 +01:00
Tobias Zwick 666a51b3d9 update documentation around DefCore, remove some obsolete fields 2013-11-30 14:14:18 +07:00
David Dormagen 54fdb2cec1 updated some remainers of the old particle system to use the new one 2013-11-28 23:38:26 +01:00
David Dormagen 0b346d67ff made pretty fireworks (with new particle system) 2013-11-28 23:28:33 +01:00
David Dormagen 6844cbbc71 changed DrawParticleLine to use the new particle system 2013-11-28 23:27:56 +01:00
David Dormagen defe1f7525 updated Grass particle and usages to new particle system 2013-11-28 23:25:30 +01:00
David Dormagen ee4b5832e2 added Smoke() function that uses the new particle system 2013-11-26 21:25:06 +01:00
David Dormagen f032dea85e adapted smoke-trail-effect to use the new particle system 2013-11-26 21:25:04 +01:00
David Dormagen 0aeb38f137 adapted MuzzleFlash particle and usages to new particle system 2013-11-26 21:25:04 +01:00
David Dormagen 241ea62d0f added new explosion effect based on Matthi's explosion with the new particle system 2013-11-26 21:25:03 +01:00
David Dormagen 1a7cd51bab changed Boompack to use the new particle system 2013-11-26 21:25:03 +01:00
David Dormagen 913f746ffe adjusted WoodChip particle and usages to new particle system and moved WoodChip particle to proper place (not only used by the axe..) 2013-11-26 21:25:00 +01:00
David Dormagen 40b84704fe adapted Trajectory particle and occurences to new particle system 2013-11-26 21:24:59 +01:00
David Dormagen ced4734035 removed the MaterialParticle and added missing Particles.c to System.ocg 2013-11-26 21:24:58 +01:00
Tobias Zwick 6b164fba97 add localization for communication with the league 2013-11-06 15:08:39 +07:00
Tobias Zwick 8da7c6b20f add internationalization for responses from the masterserver/league server 2013-11-06 13:35:27 +07:00
Maikel de Vries 994f45f521 Fix a runtime error in DarkCastle 2013-10-25 17:32:53 +02:00
Maikel de Vries b2ac11c326 Fixed Loc_Wall behavior in FindLocation.c 2013-10-04 20:58:47 +02:00
Maikel de Vries be354a99d2 Fix FindLocation for Find_Not and others acting on Find_InRect 2013-09-30 20:35:57 +02:00
Julius Michaelis b67109df8a Add /screenshot [zoom] to /help 2013-09-21 01:08:12 +02:00
Nicolas Hake 625a9f47d9 #973: Make FindObject et al. handle object context instead of Find_*
When people write obj->FindObject(Find_Distance(10)), they expect the
engine to use the distance from obj instead of the distance from the
current object (or from 0,0 if called from outside of object context).

Making the engine handle coordinate offseting at calls to FindObject
(and similar functions) instead of having the C4FO wrappers do it solves
this problem.

Compatibility impact: Code that creates their own criteria structure
instead of using the provided Find_* functions will have to be adapted
if they use any of the location-based criteria.
2013-09-01 00:46:04 +02:00
Tobias Zwick 9027544c37 Merge branch 'master' into Controls 2013-06-04 20:13:35 +02:00
Tobias Zwick 131ec86b98 refactor pump done. Remaining problem: power system (usage) 2013-05-30 22:11:39 +02:00
David Dormagen 7eaef70af1 Merge branch 'master' into Controls
Conflicts:
	planet/System.ocg/PlayerControls.txt
2013-05-26 18:19:51 +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
Tobias Zwick fe5a29b198 throw out DVORAK keyboard layout (controls are keyboard layout independent now) 2013-05-25 14:41:58 +02:00
David Dormagen 6681a2cd7d Throwing on right-click, alt-use (temporarily) on Shift+Left 2013-05-24 23:26:00 +02:00
David Dormagen cf4f85f9cf Merge branch 'master' into Controls 2013-05-24 21:31:29 +02:00
David Dormagen ae0a364587 Musket shots now exit at the correct position
Launch() of the bullet now has offset parameters
LaunchProjectile() now only calculates own offset if none was passed to the function
2013-05-24 20:45:32 +02:00
David Dormagen 04c8ad1cac removed CON_Collect (now collects only into empty slots)
fixed inventory shifting
2013-05-24 20:09:19 +02:00
Clonkonaut a61d4b4aa1 crlf -> lf 2013-05-24 19:16:49 +02:00
David Dormagen d18d8c65c9 Merge branch 'Menus' into Controls 2013-05-24 01:24:57 +02:00
David Dormagen 6c861f9165 removed the hold-number-and-click-mouse controls 2013-05-24 00:00:18 +02:00
David Dormagen c1d27bc3e9 mouse-wheel now scrolls through inventory (zoom is on shift+mouse-wheel) 2013-05-23 22:46:23 +02:00
David Dormagen 20bfab48b6 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Items.ocd/Tools.ocd/GrappleBow.ocd/Script.c
2013-05-23 17:53:41 +02:00
David Dormagen 337126fcb9 renamed MenuWindow to GuiWindow
added HP-Bar-test to MenuTest.ocs
bugfix
2013-05-09 13:28:45 +02:00
David Dormagen 9ad9a67939 Merge branch 'master' into Menus
Conflicts:
	src/script/C4StringTable.cpp
	src/script/C4StringTable.h
2013-04-07 23:02:36 +02:00
David Dormagen 1c05f22d41 added OnClose callback
more tests
minor fixes
2013-04-07 22:52:45 +02:00
David Dormagen c2ba7e65d7 improved menu functionality; added test scenario and helper objects 2013-04-04 18:36:27 +02:00
Sven Eberhardt 46a4db0409 Added callback Extinguishing (analogous to Incineration) when fire is extinguished on an object. 2013-03-27 21:33:33 +01:00
Sven Eberhardt aeeedcd770 Fix script errors in scenarios that don't load Objects.ocd 2013-03-19 19:27:19 +01:00
Sven Eberhardt 31b87ef814 Optimize global func Sign. New version is between 10% and 50% faster! 2013-02-09 01:56:06 +01:00
Sven Eberhardt 6669e965a2 Fix Loc_Material without texture parameter 2013-02-05 00:35:04 +01:00
David Dormagen 34fc771911 merged master into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c
2013-01-30 21:37:31 +01:00
David Dormagen e6487533c2 added first version of object information dialogue on right-click 2013-01-30 21:27:09 +01:00
Günther Brammer a62e556b63 Script: Reimplement GameCall in C4Script 2013-01-23 21:36:21 +01:00
David Dormagen 8970913fc7 added System.ocg/EnergyBar.c which provides AddEnergyBar() to show an energy bar over any object, adjusted Tutorial04 to use that 2013-01-22 18:44:29 +01:00
David Dormagen 38bdfd296d FindLocation: added parameters, improved documentation, now uses Par(i) 2013-01-14 10:41:10 +01:00
Nicolas Hake 016f626cbe planet: Normalize line endings 2013-01-13 19:00:12 +01:00
Tobias Zwick 28e2bdbb92 fix #724: revers the order in which GetCrew(plr,index) returns the crew 2013-01-13 15:45:51 +01:00
David Dormagen 7ba10ca3cf added IsPointInRectangle(point, rectangle) to System.ocg/Math.c 2013-01-12 18:15:51 +01:00
David Dormagen 1cd7ffec6a added a FindLocation function in System.ocg/FindLocation.c 2013-01-12 18:15:50 +01:00
Sven Eberhardt 58ea47a4fd Added support for function pointers to ScheduleCall/AddTimer/ClearScheduleCall/RemoveTimer 2013-01-02 00:50:01 +01:00
David Dormagen 6ba993bc37 fixed/adjusted ShiftContents for objects that use Library_Inventory 2012-12-29 18:42:56 +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
David Dormagen 80ac9a9503 more one-hand cleanups 2012-12-29 14:08:53 +01:00
David Dormagen bc4fd5f9ed merged master into Controls 2012-12-23 15:17:23 +01:00
David Dormagen 4dcc784d35 do not pass controls to disabled cursor anymore (i.e. via SetCrewEnabled) 2012-12-22 17:11:06 +01:00
Charles Spurrill 6ea36b5efb GetObjAlpha function added, to be consistent with SetObjAlpha 2012-11-11 12:43:20 -08:00
Charles Spurrill 9f867db1dc added global functions FadeOut(int time, bool del) and FadeIn(int time) 2012-11-11 11:44:03 -08:00
Bernhard Bonigl 1011c858cc Introduce QuickSwitch on Q (or Apostrophe for Dvorak)
QuickSwitch changes the current selection of the Inventory to the last selected one.
2012-10-07 15:44:01 +02:00
Tobias Zwick 28e30294b1 adapted some strings for open clonk 2012-10-05 00:09:33 +02:00
Tobias Zwick b5d0af513a remove splash video and option for it 2012-10-02 23:02:52 +02:00
Julius Michaelis 023aa90c0e Add config option for automatic windowed/fullscreen switching 2012-09-29 23:49:30 +02:00
Günther Brammer cc25878ba6 Default to not changing the resolution
1. We receive bugreports that changing the resolution doesn't work, but
can't reproduce that
2. Flat screens look best at their natural resolution
2012-08-19 20:59:01 +02:00
Nicolas Hake faf0006a6f Win32: Improve error reporting when changing resolution 2012-08-28 00:00:29 +02:00
David Dormagen 70bdc02ad4 burning objects do not incinerate in or into containers anymore; adjusted fire spreading a bit 2012-10-24 00:42:05 +02:00
Russell 5782557a34 Clonk. Now with 65% better grammar. 2012-10-22 18:35:06 +01:00
Maikel de Vries c6dfd21172 Fixed a few C4Script runtime errors 2012-10-22 20:24:57 +02:00
Tobias Zwick eb1d2e6e18 remove description from goal in the game over dialog 2012-10-20 18:07:43 +02:00
Armin Burgmeier b4aafdd874 Remove build number aka C4XVER4 2012-10-18 23:54:50 +02:00
David Dormagen 2631e05daa added burned graphics for the Coniferous 2012-10-14 21:51:21 +02:00
Julius Michaelis 8d2c6ca599 Fix language strings for IDS_MSG_FULLSCREEN_DESC 2012-10-14 19:13:02 +02:00
Felix Wagner b71efe70b3 Moved FindHeight to System.ocg/Math.c 2012-10-14 15:45:20 +02:00
Tobias Zwick 63fcec3e8c fix controls: interact + down = ungrab doesn't work as intended:
confusing situations can arise, e.g. while shoving a tree, one can use the foundry
2012-10-14 13:26:30 +02:00
Tobias Zwick 2a228b11ed remove non-existing control def 2012-10-14 01:20:52 +02:00
Tobias Zwick c51ffb5a26 fix descriptions in control dialog 2012-10-14 01:04:49 +02:00
Maikel de Vries 3be05409de Change the forest creation in GoldRush a bit 2012-10-13 18:57:02 +02:00
Tobias Zwick 48a7fc7968 make highres landscape default 2012-10-13 18:41:25 +02:00
Armin Burgmeier cf159068b3 Fix warning about undefined backspace key on Linux 2012-10-13 16:15:01 +02:00
Tobias Zwick 8c5005bef9 I hate Mercurial 2012-10-10 23:47:30 +02:00
Tobias Zwick d46840c90f player controls cleaned up + localization 2012-10-10 23:33:51 +02:00
Bernhard Bonigl 9a91a4dfca Reduce Collect-Priority by 1. This fixes collecting when jumping. 2012-10-10 16:38:33 +02:00
Sven Eberhardt 08b495e43d PlayerControls: When the user changes a key assignment in his local config, all derived key assignments (Key=CON_*) change as well (#807).
The "CON_" prefix is now mandatory when referencing other key assignments. Updated PlayerControls.txt to reflect that.
2012-10-08 20:45:04 +02:00
Tobias Zwick ba1a2cbdad add missing strings for localisation of controls definition dialogue 2012-10-07 18:45:50 +02:00
Tobias Zwick f296f31c62 add script that automatically removes unused strings from LanguageXX.txt in the System.ocg and executed it once 2012-10-07 15:27:30 +02:00
Charles Spurrill e019cd5655 Added missing 'MoveTowards' function in Math.c and upgraded LaunchProjectile func 2012-08-09 17:37:53 -07:00
Günther Brammer 35a0d7b6cd Script: Get/SetGravity use 1/100 px/tick^2 instead of 1/500
The old factor was chosen because the default gravity * 500 was exactly
100. But a lot of other engine interfaces use 1/100 px/tick or px/tick^2,
and that is a common scale for scripts to work in, too.
2012-07-15 22:42:17 +02:00
David Dormagen fb7151db7d added RemoveTimer() function as counterpart to AddTimer() 2012-06-24 20:37:28 +02:00
Felix Wagner d4fa3e10f3 Added settings parameter to plants' default Place() 2012-06-07 18:29:00 +01:00
Felix Wagner 0e5f0b28f2 + PlaceForest() 2012-06-07 01:45:49 +01:00
David Dormagen 80d94966bc added better documentation to some System.ocg functions 2012-06-05 22:51:09 +02:00
David Dormagen 15e29fcfd8 added very simple framework for the creation of purely visual environment objects + not-implemented-zicadas 2012-06-05 22:31:58 +02:00
Maikel de Vries c4bb9e6999 Stop fire sound if object stopped burning (real fix) 2012-05-12 14:42:20 +02:00
Maikel de Vries 797837712b Stop fire sound if object stopped burning 2012-05-12 14:07:55 +02:00
Felix Wagner 63be80a1f8 + Fire sound 2012-05-11 18:32:21 +01:00
Felix Wagner f07359e4b1 Fixed ClearScheduleCall (causing #770) 2012-05-11 16:31:47 +01:00
Bernhard Bonigl a5adc8c2ad Added missing CON_PushENter to IsInteractionControl 2012-05-08 20:42:08 +02:00
Bernhard Bonigl 3893fea82f Added Helper-Functions that categorize Controls 2012-05-07 20:34:28 +02:00
Günther Brammer 099cd15e56 Script: Remove unused OnBlastIncinerationDamage callback
Scenarios that want to override the default behaviour of BlastObject should
overload the BlastObject function itself. Objects can simply use the Damage
callback and/or set BlastIncinerate to nil.
2012-05-06 15:37:43 +02:00
Bernhard Bonigl c87d5d4435 Fixed incorrect GetPosition parameters 2012-05-06 18:10:36 +02:00
Bernhard Bonigl dce8e579d3 Added InFrontOf(object). Returns if the midpoint of the calling object is in front of the other object. 2012-05-06 18:10:16 +02:00
Maikel de Vries 6fcc0f6d2e Removed TimerCall in favour of AddTimer script implementation 2012-05-05 12:09:44 +02:00
Maikel de Vries 90ee070f33 Cleaned up Fire.c a bit 2012-05-01 20:50:21 +02:00