aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_steam
Commit message (Expand)AuthorAge
* [BREAKING] Use client-side translations instead of intllib; add zh_CN transla...ywang2020-07-19
* Use a standard wagon inventory formspecBlockhead2020-03-18
* Merge branch 'mt5-fixes'orwell962020-01-04
|\
| * Move attachment positions down 1 nodeorwell962019-12-05
* | Remove fullbright (H#140)orwell962019-12-18
|/
* Fix steam engine sound playing forever (H#121)ywang2019-11-27
* Change get_inventory_formspec API - add invname parameterorwell962018-12-10
* lower steel returnThomas Rudin2018-09-28
* Fix box wagonsorwell962018-06-14
* Fix bugs found while testingorwell962018-06-14
* Move driving_ctrl_access property to seat grouporwell962018-01-09
* steam locomotive: Add sounds and improve texturesmbb2017-12-23
* Implement sound api and some soundsorwell962017-12-06
* Change name of update_animation functionorwell962017-11-29
* Moved default train track to separate mod, for integration with advcarts.Gabriel Pérez-Cerezo2017-10-25
* Remove zip release files, move mod to root, exclude assets from Makefile (#92)rubenwardy2017-09-20
* Restructure mod directoryorwell962017-01-04
* remove train type concept and calculate train's capabilities based on used wa...orwell962016-12-22
* Turning mod into a modpack and separating the trains from the core modorwell962016-12-20
ss="hl opt">, int t); void random_turn(PseudoRandom &random, v3s16 &dir); int dir_to_facedir(v3s16 d); struct DungeonParams { s32 seed; content_t c_wall; // Randomly scattered alternative wall nodes content_t c_alt_wall; content_t c_stair; // 3D noise that determines which c_wall nodes are converted to c_alt_wall NoiseParams np_alt_wall; // Number of dungeons generated in mapchunk. All will use the same set of // dungeonparams. u16 num_dungeons; // Dungeons only generate in ground bool only_in_ground; // Number of rooms u16 num_rooms; // Room size random range. Includes walls / floor / ceilng v3s16 room_size_min; v3s16 room_size_max; // Large room size random range. Includes walls / floor / ceilng v3s16 room_size_large_min; v3s16 room_size_large_max; // Value 0 disables large rooms. // Value 1 results in 1 large room, the first generated room. // Value > 1 makes the first generated room large, all other rooms have a // '1 in value' chance of being large. u16 large_room_chance; // Dimensions of 3D 'brush' that creates corridors. // Dimensions are of the empty space, not including walls / floor / ceilng. // Diagonal corridors must have hole width >=2 to be passable. // Currently, hole width >= 3 causes stair corridor bugs. v3s16 holesize; // Corridor length random range u16 corridor_len_min; u16 corridor_len_max; // Diagonal corridors are possible, 1 in 4 corridors will be diagonal bool diagonal_dirs; // Usually 'GENNOTIFY_DUNGEON', but mapgen v6 uses 'GENNOTIFY_TEMPLE' for // desert dungeons. GenNotifyType notifytype; }; class DungeonGen { public: MMVManip *vm = nullptr; const NodeDefManager *ndef; GenerateNotifier *gennotify; u32 blockseed; PseudoRandom random; v3s16 csize; content_t c_torch; DungeonParams dp; // RoomWalker v3s16 m_pos; v3s16 m_dir; DungeonGen(const NodeDefManager *ndef, GenerateNotifier *gennotify, DungeonParams *dparams); void generate(MMVManip *vm, u32 bseed, v3s16 full_node_min, v3s16 full_node_max); void makeDungeon(v3s16 start_padding); void makeRoom(v3s16 roomsize, v3s16 roomplace); void makeCorridor(v3s16 doorplace, v3s16 doordir, v3s16 &result_place, v3s16 &result_dir); void makeDoor(v3s16 doorplace, v3s16 doordir); void makeFill(v3s16 place, v3s16 size, u8 avoid_flags, MapNode n, u8 or_flags); void makeHole(v3s16 place); bool findPlaceForDoor(v3s16 &result_place, v3s16 &result_dir); bool findPlaceForRoomDoor(v3s16 roomsize, v3s16 &result_doorplace, v3s16 &result_doordir, v3s16 &result_roomplace); inline void randomizeDir() { m_dir = rand_ortho_dir(random, dp.diagonal_dirs); } }; extern NoiseParams nparams_dungeon_density; extern NoiseParams nparams_dungeon_alt_wall;