Commit Graph

906 Commits (03d0bb49dc83ac553e02608dcc1399b78e69e481)

Author SHA1 Message Date
Mark 7f5ca45097 PowerSystem: Streamlined behavior of neutral network
The check for several neutral networks is more strict now, however. Did
not report an error in the unit test, so it *should* be OK.
2017-09-10 19:33:56 +02:00
Mark 6149f7de8a PowerSystem: Streamline method behaviour
Linked flag changing now always updates all networks (which is not very
hard on the performance), special treatment for neutral network will be
removed with the next commit.
2017-09-10 19:18:52 +02:00
Mark 0c148530a6 PowerSystem: Network creation as a function 2017-09-10 18:11:05 +02:00
Mark 28b22c6c62 PowerSystem: Use getter and setter internally 2017-09-10 15:43:19 +02:00
Mark cc21da2315 PowerSystem: Move network merging from flag to power library.
This is not totally finished yet, but this far it is mere refactoring
without changing the system itself.
2017-09-10 14:34:18 +02:00
Mark 4fab0cf47e PowerSystem: Make system overloadable
Replaced hardcoded method calls with a wrapper function
2017-09-10 12:54:11 +02:00
Mark 4838093aaf Seed: Extract function for planting manually
Makes it possible to plant manually if some object overloads ControlUse
2017-09-02 21:15:38 +02:00
Julius Michaelis c4cd9dda63 Set VIS_Editor in Library_Goal to avoid forgetting it in future goals
Fixes #1932
2017-09-01 15:59:51 +02:00
Mark d1996e45df Structure: Improved SetBasement
The access to editor actions poses a problem sometime when deleting
basements.
2017-08-27 10:40:44 +02:00
Maikel de Vries fd42ddd823 add script option to block cutting of pipes
This allows scripters to place liquid containers with fixed pipes, so that players do not break scenarios.
2017-08-20 12:58:31 +02:00
Fulgen301 f80e9dbd1a Display carry heavy objects on the clonk's back while swimming (#1764) 2017-08-14 14:49:45 +02:00
Mark eb1657c3e3 Wearable: Attachment flags
Wearable items can have attachment flags, such as matching the target
skeleton
2017-08-13 23:41:04 +02:00
Maikel de Vries bbdd38830e show keys to cycle between interaction objects 2017-08-12 22:14:54 +02:00
Mark e73c206bdd Constructor: Modular construction menu
Makes it easier to overload the individual parts
2017-07-28 23:01:19 +02:00
Mark 7f30f4d971 Fix #1930
Contained clonks can interact with their container now. Changed the
order of issued calls around a little, but it should not create unwanted
effects.
2017-07-23 20:37:53 +02:00
Mark 62ff92aa97 Structure: Allow basement override
Structures created basements with ID Basement, now the basement type can
be defined with the callback GetBasementID (default value is Basement)
2017-07-22 23:47:16 +02:00
Mark ee4ac9e825 Structure: Callback for too much damage
Added callback OnNoHitPointsRemaining() that is called if whenever the
structure is about to be removed because it took too much damage. Should
the callback return true, then the damage counts as handled and the
structure will not be removed.
2017-07-22 23:47:15 +02:00
Mark e20d5e87ae Library: Edible items
All the functionality for food is bundled in one library now
2017-07-13 21:48:36 +02:00
Maikel de Vries 12e8ee6636 fix lightning striking certain objects and loosing strength 2017-07-12 22:37:03 +02:00
Maikel de Vries 3a2c68dcc9 interaction menu: add callback target for menu entries
This allows to forward menus of one object to its parent properly. A specific usecase is cannons, which are soon to come (hopefully).
2017-06-26 17:28:40 +02:00
Mark 6cb154fabd UseControl: Prevent possible call on null object
This usually happens in the following case from ClonkControl.ocd/Script.c:

// Release commands are always forwarded even if contents is 0, in case we
// need to cancel use of an object that left inventory
if (contents || (status == CONS_Up && GetUsedObject()))
{
	if (ControlUse2Script(ctrl, x, y, strength, repeat, status, contents))
		return true;
}

It could also be necessary that, instead of contents, either "this", or GetUsedObject() should be passed. Not sure which one was intended.
2017-06-21 00:06:12 +02:00
Sven Eberhardt 04ec41b54c Hide Wearable and RangedWeapon libraries in object creator 2017-05-27 16:34:33 +09:00
Sven Eberhardt a2d6b65668 Add Title.txt for group folders in Objects.ocd and Decoration.ocd 2017-05-27 16:31:46 +09:00
Maikel de Vries 9e9e664581 only show entering interaction if actually standing at the entrance of an object 2017-05-13 15:04:02 +02:00
Maikel de Vries 496c73a50f add a method to calculate the area to the shape library 2017-05-13 14:59:14 +02:00
Maikel de Vries fd734330d6 first try to enter pushed vehicle when entering objects
There was no possibility to enter vehicles into yet, so this would be my first attempt to solve this, we can evaluate this and improve if needed.
2017-05-12 14:38:36 +02:00
Maikel de Vries f3291bb84f clean up and document relaunch rule
Also fix script errors in melting castle.
2017-05-01 11:00:51 +02:00
Nicolas Hake 23f6c74c4b Merge pull request GH#37 from Fulgen301/Rule_Relaunch 2017-04-12 17:45:51 +02:00
Clonkonaut 06a1ebe255 Fix RemoveReproductionEffect() in Animal Library. 2017-04-10 17:24:20 +02:00
Maikel de Vries 78d4fa4042 animal library: allow overloading reproductionconditions 2017-03-27 09:44:28 +02:00
Fulgen301 b0219b4614 Modify Scoreboard_Relaunch in order to work with Rule_Relaunch 2017-03-25 14:01:06 +01:00
Sven Eberhardt d4b036b541 Add weapon speed setting to enemy spawn 2017-03-05 11:27:44 -05:00
Sven Eberhardt 1c7ee21903 Add weapon speed setting to ranged weapons 2017-03-04 22:47:17 -05:00
Maikel de Vries 60f3e206cc fix variable shadowing in some scripts 2017-02-13 19:04:27 +01:00
Maikel de Vries 8d56434fc5 fix possible script runtime error in aim manager library 2017-02-02 21:47:55 +01:00
Maikel de Vries 85ce25fb0f add editor button to place basement under a structure 2017-01-15 15:38:33 +01:00
Mark 38648dedcc UseControl: #1873 Prevent use while a menu is opened.
Using objects was blocked by the GUI menus and the ObjectControl() function anyway, but (!) it was not blocked for the old style menus that can still be used.
2017-01-13 00:05:35 +01:00
Mark 92e53fe09f UseControl: Merge the two if-blocks that share the same condition 2017-01-12 23:58:38 +01:00
Mark 172613e0c9 Clonk Control / Ladder: Add possibility of triggering a jump with ydir
This was part of a bugfix in the ladder for Hazard: The ladder lets the Clonk execute a jump with Clonk.JumpSpeed / 2 at the top. This is useful for extra jumps and other things where you want to force the clonk to jump.

Regarding the ladder: The most of the problems with ladders arise from the OC implementation. Further commits may follow.
2017-01-06 21:58:13 +01:00
Mark 2168a6948a Base Material: Remove more duplicate code 2017-01-06 15:38:16 +01:00
Mark 879f21acaf Base Material: Add brackets. 2017-01-06 15:34:25 +01:00
Mark 65850d4015 Base Material: Extracted function for accessing the player's base material
Reduces duplicate code.
2017-01-06 15:27:11 +01:00
Mark 32245bfb20 Base Material: Rename 'def' to 'material' 2017-01-06 15:19:15 +01:00
Mark 2b5a2740b4 Base Material: Rename 'cnt' to 'amount' 2017-01-06 15:18:11 +01:00
Mark 548d2a7b13 Base Material: Rename 'plr' to 'player' 2017-01-06 15:16:02 +01:00
Clonkonaut e4cfd39fdc Let plants grow less crowded, especially different kinds of plants (#1607).
This will need some testing whether all scenarios are still playable.
2017-01-04 03:33:28 +01:00
Mark 83486fceb8 Control: Format scripts 2017-01-03 18:04:10 +01:00
Mark fa28a7a643 Control: Extract library for using menus
External packs use this functionality without using the whole default Clonk control.
2017-01-03 18:03:49 +01:00
Mark 39c54c323c Control: Extract library for using objects
External packs use this functionality without using the whole default Clonk control.
2017-01-03 18:03:32 +01:00
Maikel de Vries efed830df3 fix liquid container accepting materials and show them in interaction menu 2017-01-02 18:33:14 +01:00
Maikel de Vries 59961f3a17 remove base library
* remove library itself
* remove GetBase()
* change flagpole, etc.
* move basematerial library to vendor
2016-12-28 18:19:10 +01:00
Sven Eberhardt 16988e76f0 Add "flip" EditorAction to structures 2016-12-28 08:50:19 -04:00
Maikel de Vries 2392f85358 fix another c4script error when updating power network 2016-12-26 17:55:45 +01:00
Maikel de Vries a422c6d6ec power storage: save stored power and make editor property 2016-12-26 17:55:45 +01:00
Maikel de Vries 84d621fc5a fix script runtime error when updating power networks 2016-12-26 17:55:45 +01:00
Mark bace3b7d2b #1710: Remove logs for debugging 2016-12-25 19:21:16 +01:00
Mark 45f98ce03a #1710: Fix the bug
The problem was that the call to Actmap.*.StartCallLadderOverloaded happend parallely with the ladder search effect and finished after the search effect call was finished, starting a wall jump animation after the Clonk grabbed the ladder.
2016-12-25 19:21:08 +01:00
Mark 17d6bb0e1b #1710: Logs for debugging 2016-12-25 19:21:01 +01:00
Maikel de Vries 42c8dbc2c8 make producer continue directly after production finishes 2016-12-25 17:48:07 +01:00
Maikel de Vries 135a7d8aff fix support for multiple liquids in liquid containers 2016-12-25 12:48:15 +01:00
Maikel de Vries ae40126dbb implement pumping specific liquids only 2016-12-24 14:09:47 +01:00
Maikel de Vries c7afed1aeb allow pumping liquids from container (foundry and steam engine) 2016-12-24 14:09:47 +01:00
Maikel de Vries 7715d961f5 add information about whether power storages are being filled to the power display 2016-12-18 12:20:36 +01:00
Maikel de Vries 95e520a941 initialize power library local vars in construction callback (#1868) 2016-12-18 11:08:51 +01:00
Clonkonaut afc565a419 Re-enabled automatic bucket emptying (#1867). 2016-12-18 00:50:35 +01:00
Maikel de Vries 7ef0fc5568 don't let producers empty extra slots (#1864) 2016-12-16 21:37:47 +01:00
Lukas Werling 68ddeb3bed Convert all text files in planet to UTF-8 2016-12-11 21:19:13 +01:00
Maikel de Vries 1d258d3d48 fix (#1846) for real now 2016-12-01 23:02:43 +01:00
Maikel de Vries 7552fd94f7 fix ownership changes of moving flags (#1846) 2016-11-28 00:53:48 +01:00
Mark d356d9db3d Fix inherited() calls
The ... operator should be added so that the parameters are passed down. In some cases even the named parameters were not passed down.
2016-11-26 18:57:31 +01:00
Mark 94ec4e336b Fix inherited(...) calls
The named parameters have to be handed down, because the ... operator only passes all the unnamed parameters.
2016-11-26 17:56:41 +01:00
Mark 5fc6ae05f8 HUD Modularity: Move library as suggested by Clonkonaut 2016-11-26 11:12:09 +01:00
Mark 202e1ed682 HUD modularity: Callback for controller ID
I think that the call GUI_Controller->GetControllerID() has more appeal, but it makes the code confusing maybe.
2016-11-26 11:10:35 +01:00
Mark b557719287 HUD modularity: Library for HUD controller
Extracted the basic functionality for HUDs from GUI_Controller to a library. This way, if you want to create a new HUD, you only have to include the library and all the desired components. Previously you had to copy the script from GUI_Controller, too. This holds of course only if you want to actually remove components from the HUD, and not just add to it.

Currently the GUI_Controller is referenced as the ID for the HUD, will change this to a callback.
2016-11-26 11:10:29 +01:00
Sven Eberhardt 2b6eb83e48 Fix some parameter count errors 2016-10-24 21:28:31 -04:00
Sven Eberhardt 342916a1ed Fix some implicit for loop declaration errors 2016-10-24 21:02:02 -04:00
Maikel de Vries e124433cd5 fix playing sound when trying to enter enemy door 2016-10-16 18:47:45 +02:00
Maikel de Vries b4cdeb3da4 base material & production: add fail safes and remove entries with zero material 2016-10-16 18:47:45 +02:00
Mark 2957a777b3 Goal: Extracted function NotifyPlayerHUD
Removed duplicate code in the process.
2016-10-09 11:53:25 +02:00
Mark 35e8a43f82 Goal: Optimize HUD updates
No more lacking behind the fulfillment status.
2016-10-09 11:50:06 +02:00
Mark 84dd95df34 Goal controller: Player parameters for goal display functions
Allows goals with different symbols per player.
2016-10-09 11:34:13 +02:00
Lukas Werling ddb34ab5cb Disallow interaction with actively controlled Clonks
This prevents inventory stealing which is undesirable in cooperative
scenarios with competitive elements (e.g. some races) and confusing to
players.
2016-10-05 22:14:40 +02:00
Maikel de Vries 89be9bd158 implement scenario saving for liquid tank, pump & pipe 2016-10-03 18:07:49 +02:00
Maikel de Vries 1483620b2b fix c4script runtime error in power system when pump is initialized 2016-10-02 23:23:20 +02:00
Maikel de Vries b42a4b824b insect swarm: fix movement issues 2016-09-30 18:58:42 +02:00
Mark 58d42b8fd8 Library Lamp: Extracted functions.
Did this change a long time ago, probably for re-using functions in a derived object.
2016-09-15 19:17:17 +02:00
Sven Eberhardt 22af9f0e8c Fix landscape placement functions (#1820, #1821) 2016-09-14 21:30:57 -04:00
Sven Eberhardt 282a561462 Add editor props and user actions for boiling lava and acid
Also optimize the timer
2016-09-06 00:06:37 -04:00
Sven Eberhardt 6aeeff0545 Add Library_Stackable editor props 2016-09-05 20:19:25 -04:00
Sven Eberhardt db986e3dd7 Allow repeated ejection of infinite material stack counts in bucket and barrel 2016-09-05 20:08:30 -04:00
Sven Eberhardt 3330c592e3 Improve PlayerStart initial material setting to allow specification of weapon ammo, stackable stack count and liquid contents 2016-09-05 20:01:47 -04:00
Sven Eberhardt 6a78a9facb Fix scenario saving of some animal and plant properties 2016-09-04 02:52:03 -04:00
Sven Eberhardt bdbce1c4c9 Fixes and EditorProps for plant reproduction 2016-09-01 23:54:27 -04:00
Sven Eberhardt 9cec9b5071 Make animal library properties editor-adjustable
Allows e.g. placement of animals that do not reproduce.
2016-09-01 02:23:42 -04:00
Sven Eberhardt cd4e419aef Disallow interaction menu on hostile and neutral clonks
Stealing items in melees or taking quest items from NPCs is a bit odd.
2016-08-30 19:54:58 -04:00
Maikel de Vries 788ba6e0c4 allow swapping source and drain pipe at the pump 2016-08-27 17:10:30 +02:00
Sven Eberhardt 56adee6bb9 Add script goal editor properties and user actions 2016-08-20 01:55:22 -04:00
Clonkonaut 6a80ce8edb Hot Ice Hotfix: Prevent grenade launcher from getting stuck uselessly in aim mode.
This fix might be dangerous, I do not know it. I have no real idea what this line was supposed to do. But it certainly prevented the release use command from getting to the used item in certain corner cases (right between loading and aiming).
I tested a bunch of vehicle and they work fine so far. So maybe this line was useless and harmful after all.
2016-08-20 00:56:50 +02:00
Clonkonaut 01232b61a5 Fixed taking off of helmet when putting on another. 2016-08-17 20:23:33 +02:00
Maikel de Vries 192ccc0203 prevent hitting self with reverse throw (#1759) 2016-08-15 19:20:08 +02:00