Commit Graph

5505 Commits (16988e76f074c924b45c9b55a7a911784c3f41ec)

Author SHA1 Message Date
Sven Eberhardt 1cde52e060 Editor: Add "Export packed" file menu item 2016-11-20 22:43:44 -05:00
Sven Eberhardt 290d606bc5 Fix boiling liquid visibility, saving and activity in cave maps 2016-11-20 21:52:33 -05:00
Sven Eberhardt a5de44b4e9 Add UserAction: Set shader 2016-11-20 13:43:46 -05:00
Sven Eberhardt 04b5f82080 Editor: Add "open in network" to file menu and to new scenario dialogue 2016-11-20 13:24:09 -05:00
Sven Eberhardt 4b508134f8 Add clonk EditorAction: Turn around 2016-11-20 13:15:03 -05:00
Sven Eberhardt 27291ec977 Automatically move dropped items from dialogue to dialogue target
Because it happens easily when editing.
2016-11-20 13:15:02 -05:00
Sven Eberhardt 615e08a137 UserAction evaluator: Object alive 2016-11-20 13:15:02 -05:00
Sven Eberhardt fb400456ce Add MovingBrick editorprops and graph movement 2016-11-20 13:15:01 -05:00
Sven Eberhardt 4a31ce0fd8 Add editor prop for neutral flagpoles 2016-11-20 13:14:59 -05:00
Sven Eberhardt 8ac9a1e2bf Add Rule_BaseRespawn editor props 2016-11-20 13:14:58 -05:00
Sven Eberhardt bcf782a5a8 Improve diamond+socket scenario saving and editor visibility 2016-11-20 13:14:57 -05:00
Mark f2870dfa16 Object.c: New functions
Needed AddSpeed() in a project and thought that it would be a good addition. AddVelocity() is not used so far, maybe we should remove it again.
2016-11-19 19:05:27 +01:00
Fulgen301 399a619e4c Aerobatics: German translation added. 2016-11-13 21:57:16 +01:00
Maikel de Vries bfc830a103 fix wrongly turned catapult (#1838) 2016-11-11 20:10:12 +01:00
Fulgen301 fb882d693e Ropebridge: German translation added. 2016-11-11 18:43:35 +01:00
Fulgen301 db61e047ee Tutorial 06: German translation added. 2016-11-11 18:43:35 +01:00
Fulgen301 863213fe76 Rapid Refining: German translation added. 2016-11-11 18:34:35 +01:00
David Dormagen 83435a89fa Fixed typo in German localization (#1848) 2016-11-11 18:20:59 +01:00
David Dormagen ae2000f0a1 Contents menu: sort extra-slot containers to front to make items jump around less
With the highest items being in the front, the tight grid layout has less reason to resort a major amount of the items every time items are added or removed. This results in a generally more stable layout.
2016-11-07 20:09:37 +01:00
David Dormagen 12e808263b Contents menu: use tight grid layout (#1842)
This makes extra-slot containers not block an extra row anymore. However, they might jump around a bit. It might be a good idea to set their priority lower to make them always appear first.
When they would be in front, the tight grid layout would likely not move them around.
2016-11-05 15:35:15 +01:00
David Dormagen 8a8593e0ba Script GUI: added TightGridLayout style (requirement of #1842)
The TightGridLayout fills spaces more aggressively. This is slower but makes for a tighter layout. Finding the best layout is NP-complete. This here is just O(N^2) or so.
2016-11-05 15:35:15 +01:00
Sven Eberhardt 02dffb8af1 Allow rotation of guideposts 2016-10-31 10:10:29 -04:00
Sven Eberhardt 8e281103b0 Improve guidepost editor placement and rotation
* Shows correct size in preview (by setting the scaling on the definition instead of in Construction)
* Can be oversized
* Avoid angles where all signs are facing parallel to the camera
* Unfortunately, rotation doesn't work well with Mesh Transform (uses the wrong rotation center for the graphics)
2016-10-31 00:34:48 -04:00
Sven Eberhardt aed3f92982 Fix dialogue sequence assignment
It used to be set by reference instead of copying, which means all dialogues created in a single session would reference the same sequence.
2016-10-30 21:56:08 -04:00
Sven Eberhardt d048ca01dc Fix resource goal scenario saving 2016-10-30 20:33:55 -04:00
Sven Eberhardt a07d26c839 Fix conditional UserAction in loops 2016-10-30 20:33:55 -04:00
Sven Eberhardt 3712c6ed2f Change MoveTo function signature in experimental CableLorry 2016-10-30 20:33:54 -04:00
Sven Eberhardt 2b6eb83e48 Fix some parameter count errors 2016-10-24 21:28:31 -04:00
Sven Eberhardt 591b20b6ca Fix some variable name shadowing errors 2016-10-24 21:21:55 -04:00
Sven Eberhardt 0d20551ab6 Fix some "function variable hides local variable" warnings 2016-10-24 21:05:17 -04:00
Sven Eberhardt 342916a1ed Fix some implicit for loop declaration errors 2016-10-24 21:02:02 -04:00
Sven Eberhardt 7f543e8390 Add AI control UserActions 2016-10-24 21:02:02 -04:00
Sven Eberhardt 2e73343814 EnemyAI: Add "active" setting
This allows disabled AI clonks (to be used by UserActions)
2016-10-24 21:02:01 -04:00
David Dormagen 83260c5e69 Key object: updated graphics
This one has a higher resolution and should also look decent when bigger (e.g. as an inventory picture). Made by me with Blender.
2016-10-24 18:12:45 +02:00
Sven Eberhardt 8fb8be9cec Sequence: Store trigger offset to allow non-synchronized triggers at the same interval 2016-10-23 00:20:26 -04:00
Sven Eberhardt a0580580aa Add rdir parameter to user action object creation 2016-10-16 21:47:20 -04:00
Maikel de Vries 0d6a8497fc allow setting the rotation of an created object in editor user actions 2016-10-16 19:59:54 +02:00
Maikel de Vries 9aaec9a009 add option to door to lock it with a given key 2016-10-16 18:47:45 +02:00
Maikel de Vries 5e7ce466e1 add key object
Can be used to open doors, etc. Editor interactions and stuff are still on the todo.
2016-10-16 18:47:45 +02:00
Maikel de Vries ff2c32b77e play keypad sounds only for operating player 2016-10-16 18:47:45 +02: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 44b2fda439 Cloud: Insert snow only if allowed to 2016-10-14 18:43:35 +02:00
Sven Eberhardt 15d850e4ec Editor: Add effects to property viewer 2016-10-14 10:50:17 -04:00
Maikel de Vries ce92a3cc16 add floor switch object to Decoration.ocd 2016-10-13 23:11:58 +02:00
Mark 0996c6e31e Cloud: Play sound at rain impact location
The cloud does this with a helper object.
2016-10-11 21:51:32 +02:00
Mark 7df951fb65 Cloud: Mode without material insertion
Added a mode where the cloud does not extract or insert any materials, so that the rain is just a decorative element of the game.
2016-10-11 21:19:21 +02:00
Sven Eberhardt 4eae2b28d7 Editor: Fix drop cursor drawing 2016-10-10 21:26:10 -04:00
Sven Eberhardt eee79366d0 Add tool tip to "test sequence" button 2016-10-10 16:45:24 -04:00
Sven Eberhardt 6e6f642be6 Add tool tip to dialogue editor action 2016-10-10 16:45:24 -04:00
Sven Eberhardt 244650bb17 Add base material to player spawn object.
Set the default to a lot of clonks. This is useful so the "respawn at flagpole" rule works as expected even if users don't know about the base material setting.
2016-10-09 13:27:20 -04:00
Sven Eberhardt b0e42e35d1 Sequence: Default action to empty sequence 2016-10-09 13:27:20 -04: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
Mark 9fcd3ee13e Goal controller: Extracted functions
Made the variable names consistent between GoalSubMenu() and OnGoalUpdate();
Extracted the functions GetGoalSymbol() and GetGoalGraphics();
2016-10-09 11:26:47 +02:00
Mark b18a7b7a3f Goal controller: Readability
The change in call structure should not make that much of a difference in performance.
2016-10-09 11:18:10 +02:00
Mark 0d22f58b52 Goal controller: Get short description only once. 2016-10-09 11:13:12 +02:00
Mark 0732b7dc87 Goal controller: Code cleanup 2016-10-09 11:11:51 +02:00
Mark b235c5e9e4 Goal controller: Simplified code 2016-10-09 11:11:28 +02:00
Mark f52159b835 Goal controller: Variable definitions 2016-10-09 10:58:37 +02:00
Mark be207737bc Goal controller: Slight optimization
No need to call the function twice. This is trivial though, the call is not expensive usually.
2016-10-09 10:51:48 +02:00
Sven Eberhardt c05ee7e644 Add gravestone inscription editor props 2016-10-08 23:29:50 -04:00
Mark 7c169c7905 Moved object interaction menu sidebar icons to separate overloadable functions 2016-10-08 17:46:39 +02:00
Maikel de Vries 2505dc77f1 add room door to Decoration.ocd
This is a door which leads to nowhere, but they can be connected via script or serve other purposes. Graphics by Apfelclonk.
2016-10-06 18:43:04 +02:00
Clonkonaut f37eda9508 Moved HUD proplist definitions to separate, overloadable functions.
See http://forum.openclonk.org/topic_show.pl?pid=32552#pid32552 for more information.
2016-10-06 01:47:45 +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
Sven Eberhardt 4756fb0ba1 Unify moving brick graphics size.
Otherwise, there were still graphics artifacts sometimes.
2016-10-03 00:02:46 -04:00
Sven Eberhardt 76ce8089af Fix display of moving bricks with size<4. 2016-10-02 23:47:02 -04:00
Sven Eberhardt d48dbfba82 Add optional size parameter to Particles_Flash 2016-10-02 23:47:01 -04: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 48d98d708e fix script error in keypad 2016-10-02 08:03:14 +02:00
Maikel de Vries b0ff00439f fix possible script error in pump 2016-10-01 19:18:23 +02:00
Maikel de Vries 2073fb0f0a improve picture graphics of animals 2016-10-01 16:32:29 +02:00
Maikel de Vries 1eb17613bc keypad: allow alternative graphics for its buttons 2016-10-01 16:32:29 +02:00
Maikel de Vries df43ab86f2 add IsAnimal to animals for finding them 2016-10-01 16:32:29 +02:00
Sven Eberhardt 9299ec4223 Fix max energy in AI test scenario 2016-10-01 10:26:43 -04:00
Sven Eberhardt b317afbadc Fix division by zero on progress bars with max=0 2016-10-01 10:26:25 -04:00
Sven Eberhardt d04476ad0b Allow oversize and rotation of fence 2016-09-30 22:23:11 -04:00
Sven Eberhardt 0604a815d0 Fix undefined constant in keypad 2016-09-30 21:40:57 -04:00
Maikel de Vries fa977149e9 make firefly use insect swarm library 2016-09-30 18:58:42 +02:00
Maikel de Vries b42a4b824b insect swarm: fix movement issues 2016-09-30 18:58:42 +02:00
Maikel de Vries 32f5b1cb25 add keypad to decoration objects
This can control lots of things and triggers on entering the correct code.
2016-09-26 17:15:37 +02:00
Lukas Werling 10622a9b61 Add generic A* implementation for path finding in graphs 2016-09-26 16:30:47 +02:00
Maikel de Vries 0e76c85531 make line overlap check a global function
This avoids code duplication and really is a Math.c function.
2016-09-24 17:30:19 +02:00
Maikel de Vries fb38acb946 allow setting plr view/zoom at player start object 2016-09-23 20:21:34 +02:00
Maikel de Vries 18424aaaa7 add rule to control pump speed 2016-09-23 09:26:06 +02:00
Maikel de Vries 4c7d27ec64 bats require less space on placement 2016-09-23 09:18:57 +02:00
Maikel de Vries 3df960851c _inherited() for trees to access library functionality 2016-09-20 15:11:32 +02:00
Maikel de Vries 823b13d764 add simple string to integer conversion function
Just a basic one in C4Script for now.
2016-09-18 11:30:35 +02:00
Lukas Werling db12ed7c99 Remove FindSubstring as it's really really slow
Use RegexSearch() instead, which is 100 times faster for large strings
(see benchmark results below).

Example benchmark:

    global func TestFindSubstring(int iterations)
    {
    	var result;
    	for (var i = 0; i < iterations; i++)
    	{
    		result = FindSubstring(hamlet, "and");
    	}
    	return result;
    }

    global func TestRegexSearch(int iterations)
    {
    	var result;
    	for (var i = 0; i < iterations; i++)
    	{
    		result = RegexSearch(hamlet, "and");
    	}
    	return result;
    }

    global func RunBenchmark(int iterations)
    {
    	StartScriptProfiler();
    	Log("FindSubstring: %d iterations", iterations);
    	var substr = TestFindSubstring(iterations);
    	Log("RegexSearch: %d iterations", iterations);
    	var regex = TestRegexSearch(iterations);
    	StopScriptProfiler();

    	if (!DeepEqual(regex, substr))
    		Log("Results differ: %v vs %v", substr, regex);
    }

Results:

    FindSubstring: 100 iterations
    RegexSearch: 100 iterations
    Profiler statistics:
    ==============================
    48903ms      Global.FindSubstring
    48903ms      Global.TestFindSubstring
    47979ms      Global.TakeString
    00504ms      Global.TestRegexSearch
    00016ms      Global.PushBack
    ==============================
2016-09-17 20:08:43 +02:00
Maikel de Vries 4b54b86d30 add function to find substrings 2016-09-16 17:25:22 +02:00
Mark ae1de739b0 Wooden Bridge: Return other bridge in CombineWith()
Apparently the return value is not used anywhere; the change allows chaining multiple bridges in a comfortable call.
2016-09-15 19:25:16 +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 0cdad64934 Fix goal and rule displays (#1811) 2016-09-14 21:46:16 -04:00
Sven Eberhardt 22af9f0e8c Fix landscape placement functions (#1820, #1821) 2016-09-14 21:30:57 -04:00
Sven Eberhardt 61b1ab08ad Editor: More shortcuts; show helper shortcuts in tools menu 2016-09-10 01:17:40 -04:00
Sven Eberhardt d3d7256fec Fix missing achievement in Krakatoa's Krach (#1819) 2016-09-10 01:17:39 -04:00
Sven Eberhardt 53b365a6d2 Editor: Add shortcuts, menu items, tooltips 2016-09-08 01:56:01 -04:00