Commit Graph

598 Commits (544c1cbb4bb6da97d30571ff28772660c7ad5969)

Author SHA1 Message Date
David Dormagen 77bdc8e841 disallow collection via shift when contained (#1677) 2016-02-10 18:12:09 +01:00
David Dormagen 76f971e9d9 interaction highlight: limit highlight's Plane for objects behind the Clonk
Otherwise, a catapult might appear to shine through the Clonk. This might look odd.
For objects in front the the Clonk, the GUI-Plane is kept.
2016-02-08 12:35:42 +01:00
David Dormagen c6da7d54aa interaction highlight: create selector particle with a slight delay
Only on first selection, though.
http://forum.openclonk.org/topic_show.pl?pid=31112#pid31112
2016-02-08 12:31:54 +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 d9760cdab6 controls: properly set noholdingcallbacks to false when using ControlUseStart (#1327)
Otherwise the situation could arise where you used a ControlUseStart object (the wallkit) but noholdingcallbacks was still set to true (because e.g. you used a hammer before). Then you would not be able to move the preview.
This is described in a comment to the referenced bug.
2016-02-07 10:47:33 +01:00
Sven Eberhardt 623f838799 Add sounds: Hits::BucketHit*, Structures::DoorOpen*, Structures::DoorClose* by ala 2016-02-06 14:37:18 -05:00
Maikel de Vries fb0932df26 fix additional preview overlay after combining with other structure
This caused an overlay warning in the previewer object when constructing an elevetor and combining it with another elevator and detaching it again.
2016-01-30 12:28:35 +01:00
Maikel de Vries 2d22022a20 correctly place/preview basement for elevator (#1534) 2016-01-30 12:28:35 +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
Maikel de Vries 5927e55973 fix script error in power library when a foundry (not really a consumer) is removed 2016-01-29 11:40:08 +01:00
Clonkonaut 29bfdf73ea Elevator construction preview shows placement of the case (#1534).
Structures can use the definition call ConstructionPreview(Previewer Object, Overlay, Direction) to add any overlay to the previewer. It will be coloured accordingly.
2016-01-28 00:31:22 +01:00
Mark 93ba7c5954 Vendor Library
Extracted the buy menu of the flagpole to a library, so that other objects can implement a buy menu without having to duplicate the code. An overview of the changes follows:

Library_Base:
- Moved auto-sell functionality to Library_Vendor
- Moved buy and sell functionality to Library_Vendor
- Removed the old engine menu for buying and selling

Library_Vendor:
- Added proplist for accessing local variables, avoiding variable clashes
- Added interfaces GetBuyValue, GetBuyableItems, GetBuyableAmount, ChangeBuyableAmount, GetSellValue
- Changed DoBuy: it uses the interface functions, instead of hardcoded base material
- Changed / merged the existing sell functionality and the flagpole sell functionality in DoSell:
   * does not sell items if QueryOnSell returns true
   * sell sound only audible to seller
   * the sold object tries selling its contents first (for example a bow, if it ever were sellable. This may not hold in the settlement games, but adventures would allow it)
   * the sold object ejects any contents before it is removed. These are usually unsellable objects. Previously they would just be removed together with the object. It has to be tested whether this places the items on the ground or at the center of the sold object
   * removed the "sell all" functionality on right-click for the moment.
- Still has some functions from the old base selling: CanStack and GetSellableContents, for the auto-sell functionality
- Fixed a logical error in AllowBuyMenuEntries
- Distinguish between buyer/seller and payer more, so that the logic can easily be changed in one line later
- Allow for runtime overloads of interface functions
- Changed inconsistent variable naming to a more consistent one
- Added namespaces to all sounds, the "UnCash" sound still does not exist
- Added localization strings for insufficient wealth
- Fixed property name error (missing 'e')
- Buy menu is active by default

Flagpole:
- Replaced the custom sell functionality (how many of these do we have actually??) with the sell functionality from Library_Vendor
- Buying menu is allowed if the rule is active

System.ocg/Object.c
- global functions Buy and Sell ask the target if it is a vendor, instead of whether it is a base, and do the callback there.
- renamed the argument so that it is no longer called "base", but "vendor"
2016-01-24 20:11:27 +01:00
Maikel de Vries 84218d1cbc merge UsageHelp into Description
This is better for the new interaction menu, since only the description is shown for items, but it can be longer now.
2016-01-23 16:28:02 +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
Maikel de Vries d9dccd01ad fix construction previewer showing green in front of existing sites 2016-01-20 16:32:05 +01:00
Maikel de Vries d500218a02 fix shape of basement construction preview and site (#1586) 2016-01-20 15:40:19 +01:00
Maikel de Vries 4114738b45 add power information to interaction menu for flagpole (#1579) 2016-01-20 13:21:02 +01:00
Maikel de Vries d23328f2c7 power library: methods to for storage information and balance updates 2016-01-20 13:19:37 +01:00
David Dormagen 5f25baa058 producers: show progress of current product (#1549)
This is solved via another entry in the production menu (below the products), which is updated by an effect, that is being told the menu ID/target by the interaction menu through a callback.
This setup allows for very intrusive changes to the interaction menu with only few lines of code!
2016-01-20 10:36:50 +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 8d805a49a7 Raid: Fix goal descroptions and buckets in Mave's foundry. 2016-01-16 01:33:06 +01:00
Sven Eberhardt 44f913d0e5 Do not display grab interaction when swimming (unless clonk returns true on CanGrabUnderwater callback) 2016-01-15 08:54:50 -05:00
Sven Eberhardt 71b96bc5de Fix nil pointer access when recovering from over-full inventory 2016-01-14 22:30:55 -05:00
Maikel de Vries 4357004dbf prevent picking up heavy objects when on grapple rope and draw in rope when picking up heavy object (#1521)
Maybe there are other places where the controls libraries should make callbacks to control effects. But that is for the future.
2016-01-13 23:13:44 +01:00
Maikel de Vries 82b090c7ca producer library does not request power if producer is not a consumer (#1602) 2016-01-12 22:17:41 +01:00
Sven Eberhardt 7208a3c299 Ignore CarryHeavy for collection limit #1587
It was always ignored when picking up the CarryHeavy, but not when collecting another item. Now CarryHeavy consistently gives an extra item slot.
2016-01-10 21:52:44 -05:00
Sven Eberhardt 05b6ee2407 Remove unused library dummy graphics. 2016-01-10 11:59:55 -05:00
Sven Eberhardt 0f2057032f Retain inventory slot order on respawn #1543 2016-01-10 11:10:45 -05:00
Sven Eberhardt 3dad1c6d81 Turn MaxContentsCount and HandObjects into properties instead of callbacks (Possibly fixes #1553) 2016-01-10 10:41:34 -05:00
Maikel de Vries 092f9846dc ensure showing construction materials for sites at the bottom of the map (#1365) 2016-01-10 14:18:58 +01:00
David Dormagen 14c413028c interactions: always show action target & use AtRect instead of AtPoint
The players have no notion about the midpoint of an object and are thus confused when clearly standing in front of something and not being able to interact with it.
(Yes that happened in a Let's Play and yes, that's why the interaction menu also uses Find_AtRect.)
2016-01-03 17:39:26 +01:00
David Dormagen 22d9a21ff7 carry heavy: remove special treatment of CON_Interact
Because it's an interaction. It should use the interaction interface and not some self-made hack. Previously, setting down a carry heavy object would always be executed even if aborted with Space+S.
2016-01-03 17:38:05 +01:00
David Dormagen 4b398f95eb construction site: fix unstuck check for free objects
We are looking for free objects. So for OCF_InFree and not for Not(OCF_InFree). Now Clonks are e.g. unstuck when the landscape adjusts to a construction site.
2016-01-03 17:35:47 +01:00
Clonkonaut b2ecfcfc48 Slight improvements to Guardians.
A single player now receives four times more wave bounty than before, scaling up to four players. It's still challenging but I believe now doable.
Enemies should no longer jump off airships when being shot at.
Fixed a typo in the airship appendto script.
Fixed a possible null pointer when changing weapons.
2016-01-03 01:53:55 +01: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
Günther Brammer 00a4c6c428 Replace BorderBound DefCore value with BorderBound object property 2016-01-01 22:18:41 +01:00
Clonkonaut ef48a60b27 Fix possible null pointer. 2015-12-30 03:21:53 +01:00
Maikel de Vries ede6078c75 move out of solidmask as structure library function 2015-12-29 22:40:52 +01:00
David Dormagen 7fce9071e3 lower interaction priority of dead Clonks 2015-12-29 18:28:23 +01:00
David Dormagen 58aec33841 prevent insects from being hit by projectiles (#1515)
..which is now possible due to IsProjectileTarget being the only criterium (because OCF_Alive is not explicitely checked anymore).
2015-12-28 11:20:58 +01:00
Maikel de Vries 509bdac5bc remove unused Rebuy property from objects 2015-12-28 10:21:49 +01:00
Maikel de Vries 42cf57afb6 improve drawing speed of ropebridge (and further clean up) 2015-12-26 15:57:30 +01:00
Maikel de Vries e4b1fe94ca clean up grapple bow scripts 2015-12-25 16:11:17 +01:00
David Dormagen 25eb673b4c insect swarm library: slightly improved performance of MoveToTarget
..by not using proplist access too much. I noticed the Playground would start lagging (debug build) and the profiler told me it was the mosquitos.

Before, 83% of the time in Mosquito::Activity was spent in MoveToTarget. After the change, only around 70% (multiple runs).
Is this a sensible way to measure the change?

Previous:
[14:30:22] 00186ms	Mosquito.Activity
[14:30:22] 00155ms	Mosquito.MoveToTarget

Afterwards:
[14:37:37] 00238ms	Mosquito.Activity
[14:37:37] 00172ms	Mosquito.MoveToTarget
2015-12-24 14:44:57 +01:00
Maikel de Vries 4c37584ea2 fix ladder grabbing when at the top of the ladder 2015-12-22 09:57:35 +01:00
Maikel de Vries 32bc68fdab fix letting go of wall when pulling in grappler rope (1219) 2015-12-21 22:21:32 +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 dea3b7f1c3 fix invertion of clonk on top ladder elements (#775) 2015-12-17 19:40:15 +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