summaryrefslogtreecommitdiff
path: root/src/keycode.cpp
Commit message (Collapse)AuthorAge
* Fix keycodes (#325)Ilya Zhuravlev2012-12-23
|
* Fix GUIKeyChangeMenu so that '/' can be inserted on a finnish keyboardPerttu Ahola2012-09-01
|
* Don't crash in "unexpected multibyte character"; just print it in log. ↵Perttu Ahola2012-09-01
| | | | Github #222
* Fix wctomb useAndreas Zwinkau2012-07-21
| | | | | | | wctomb(NULL, _) returns "nonzero if the encoding has nontrivial shift state, or zero if the encoding is stateless." I assume the intentation was to get the size of the target buffer. Use MB_CUR_MAX for this.
* Remove mbtowc warningsAndreas Zwinkau2012-07-21
| | | | | | | | | As mbtowc(_, _, 1) reads at most one char, everything other than a return value of 1 is an error. Since the input strings are static, an assert protects against future changes. Likewise, wctomb should currently never encounter a character, which actually needs a multibyte representation.
* Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola2012-06-05
| | | | GPLv2/later, by agreement of major contributors
* Fix key change menu a bitPerttu Ahola2012-01-06
|
* Header file tweaking; mainly for speedPerttu Ahola2011-10-12
|
* Overhaul the input systemGiuseppe Bilotta2011-08-22
| | | | | This allows us to map the keys which are not considered in irrlicht's EKEY_CODE system, such as \, [, /, ] etc.
* Fix keycode_to_keyname return valueGiuseppe Bilotta2011-08-13
|
* Clean up key names handlingGiuseppe Bilotta2011-08-12
| | | | | Constify keycode and move the static array of localizable names from the guiKeyChangeMenu header to the implementation file, changing its name.
* Merge branch 'master' of https://github.com/erlehmann/minetest-delta.git ↵Sebastian Rühl2011-06-26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into upstream_merge Conflicts: .gitignore CMakeLists.txt data/heart.png src/CMakeLists.txt src/game.cpp src/guiMainMenu.cpp src/inventory.cpp src/map.cpp src/mapblock.cpp src/mapnode.cpp src/mapnode.h src/materials.cpp src/server.cpp Signed-off-by: Sebastian Rühl <bahamada_basti@yahoo.de>
| * added new submenu for key assignmentteddydestodes2011-06-01
|/ | | | configwriting/saving isn't complete and will break your config if you use fancy keys
* Added key configuration in the configuration file.Perttu Ahola2011-05-14
d ^- optional: Function that is called whenever the train's velocity changes or every 2 seconds. Used to call 'self.object:update_animation()' if needed. } # Notes on wagons - Every wagon has the field 'unique_id' which assigns each wagon a random id. - All properties written in the lua entity (self) are saved and restored automatically. Minetest's internal staticdata is only used to save the unique_id of the wagon, which serves as a key in an externally saved table. - Assuming Z Axis as the axis parallel to the tracks and Y Axis as the one pointing into the sky, wagon models should be dimensioned in a way that: - their origin is centered in X and Z direction - their origin lies 0.5 units above the bottom of the model - the overall extent in X and Y direction is <=3 units - wagon_span is then the distance between the model origin and the Z axis extent. # Seating behavior If the advanced seating behavior is active, clicking on a wagon will immediately get you on that wagon depending on the entries in assign_to_seat_group. If all seat groups are full, if the doors are closed or if you are not authorized to enter this seat group(e.g. driver stands), will show a warning. On a train, right-clicking the wagon will make you get off the train unless: - the doors are closed and it requires open doors. - you have access to a seat group specified in access_to (you may enter it and it's not full) - you are the owner and can access the wagon preferences In case there's no possibility, does nothing. In case there are multiple possibilities, will show a form. If you can't enter or leave a train because the doors are closed, holding the Sneak key while right-clicking bypasses the "doors have to be open" enforcement. ### Tracks Most modders will be satisfied with the built-in tracks. If cog railways, maglev trains and mine trains are added, it is necessary to understand the definition of tracks. Although the tracks API is there, explaining it would require more effort than me creating the wanted definitions myself. Contact me if you need to register your own rails using my registration functions. However, it is still possible to register single rails by understanding the node properties of rails. minetest.register_node(nodename, { ... usual node definition ... groups = { advtrains_track_<tracktype>=1 ^- this group tells that the node is a track not_blocking_trains=1, ^- this group tells that the node should not block trains although it's walkable. }, connect1 = 0, connect2 = 8, ^- These values tell the direction (horizontal) the rail ends are pointing to. 0 means +Z, then rotation values increase clockwise. For a translation of directions to positions see helpers.lua. rely1=0, rely2=0, ^- the Y height of the rail end 1/2. A value of >=1 means that the rail end points to the next y layer at rely-1 railheight=0, ^- the height value of this rail that is saved in the path. usually the median of rely1 and rely2. can_dig=function(pos) return not advtrains.get_train_at_pos(pos) end, after_dig_node=function(pos) advtrains.ndb.update(pos) end, after_place_node=function(pos) advtrains.ndb.update(pos) end, ^- the code in these 3 default minetest API functions is required for advtrains to work, however you can add your own code advtrains = { on_train_enter=function(pos, train_id) end ^- called when a train enters the rail on_train_leave=function(pos, train_id) end ^- called when a train leaves the rail } })