From eda16acbca8163d95fbb1d2cb0bdaef7736d0561 Mon Sep 17 00:00:00 2001 From: def Date: Mon, 8 Apr 2019 19:39:55 +0200 Subject: [PATCH 1/4] Explain game tiles and entities in editor (fixes #1600) - Explanations by Lady Saavik taken from https://ddnet.tw/explain/ - CCW/CW were mixed up in enum names, fixed - Make sure that the texts fits, otherwise reduce font size - Still need explanations for Portal tiles --- CMakeLists.txt | 1 + src/game/collision.cpp | 4 +- src/game/editor/editor.cpp | 40 ++- src/game/editor/editor.h | 1 + src/game/editor/explanations.cpp | 424 +++++++++++++++++++++++++++++ src/game/mapitems.h | 22 +- src/game/server/gamecontroller.cpp | 2 +- 7 files changed, 479 insertions(+), 15 deletions(-) create mode 100644 src/game/editor/explanations.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index d951b0863..07c3fa48b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -875,6 +875,7 @@ if(CLIENT) auto_map.h editor.cpp editor.h + explanations.cpp io.cpp layer_game.cpp layer_quads.cpp diff --git a/src/game/collision.cpp b/src/game/collision.cpp index d639fa11f..4727feb43 100644 --- a/src/game/collision.cpp +++ b/src/game/collision.cpp @@ -1121,8 +1121,8 @@ int CCollision::IsCheckpoint(int Index) return -1; int z = m_pTiles[Index].m_Index; - if(z >= 35 && z <= 59) - return z-35; + if(z >= TILE_CHECKPOINT_FIRST && z <= TILE_CHECKPOINT_LAST) + return z - TILE_CHECKPOINT_FIRST; return -1; } diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index e1d9b295d..ecc4466c5 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -2547,7 +2547,26 @@ void CEditor::DoMapEditor(CUIRect View) // brush editing if(UI()->HotItem() == s_pEditorID) { - if(m_Brush.IsEmpty()) + int Layer = NUM_LAYERS; + if(m_ShowPicker) + { + CLayer *pLayer = GetSelectedLayer(0); + if(pLayer == m_Map.m_pGameLayer) + Layer = LAYER_GAME; + else if(pLayer == m_Map.m_pFrontLayer) + Layer = LAYER_FRONT; + else if(pLayer == m_Map.m_pSwitchLayer) + Layer = LAYER_SWITCH; + else if(pLayer == m_Map.m_pTeleLayer) + Layer = LAYER_TELE; + else if(pLayer == m_Map.m_pSpeedupLayer) + Layer = LAYER_SPEEDUP; + else if(pLayer == m_Map.m_pTuneLayer) + Layer = LAYER_TUNE; + } + if(m_ShowPicker && Layer != NUM_LAYERS) + m_pTooltip = Explain((int)wx / 32 + (int)wy / 32 * 16, Layer); + else if(m_Brush.IsEmpty()) m_pTooltip = "Use left mouse button to drag and create a brush. Hold shift to select multiple quads."; else m_pTooltip = "Use left mouse button to paint with the brush. Right button clears the brush."; @@ -4597,14 +4616,23 @@ void CEditor::RenderStatusbar(CUIRect View) if(m_pTooltip) { + char aBuf[512]; if(ms_pUiGotContext && ms_pUiGotContext == UI()->HotItem()) - { - char aBuf[512]; str_format(aBuf, sizeof(aBuf), "%s Right click for context menu.", m_pTooltip); - UI()->DoLabel(&View, aBuf, 10.0f, -1, -1); - } else - UI()->DoLabel(&View, m_pTooltip, 10.0f, -1, -1); + str_copy(aBuf, m_pTooltip, sizeof(aBuf)); + + float FontSize = 10.0f; + + while(TextRender()->TextWidth(0, FontSize, m_pTooltip, -1) > View.w) + { + if(FontSize > 6.0f) + FontSize--; + else + str_format(aBuf, sizeof(aBuf), "%.*s...", str_length(aBuf) - 4, aBuf); + } + + UI()->DoLabel(&View, m_pTooltip, FontSize, -1, View.w); } } diff --git a/src/game/editor/editor.h b/src/game/editor/editor.h index cef66da30..bc1e51150 100644 --- a/src/game/editor/editor.h +++ b/src/game/editor/editor.h @@ -1045,6 +1045,7 @@ public: void AddFileDialogEntry(int Index, CUIRect *pView); void SortImages(); + const char *Explain(int Tile, int Layer); int GetLineDistance(); void ZoomMouseTarget(float ZoomFactor); diff --git a/src/game/editor/explanations.cpp b/src/game/editor/explanations.cpp new file mode 100644 index 000000000..90e84ece4 --- /dev/null +++ b/src/game/editor/explanations.cpp @@ -0,0 +1,424 @@ +#include "editor.h" + +// Explanations by Lady Saavik +const char *CEditor::Explain(int Tile, int Layer) +{ + switch(Tile) + { + case TILE_AIR: + return "EMPTY: Can be used as an eraser."; + case TILE_SOLID: + if(Layer == LAYER_GAME) + return "HOOKABLE: It's possible to hook and collide with it."; + break; + case TILE_DEATH: + if(Layer == LAYER_GAME) + return "KILL: Kills the tee."; + break; + case TILE_NOHOOK: + if(Layer == LAYER_GAME) + return "UNHOOKABLE: It's not possible to hook it, but can collide with it."; + break; + case TILE_NOLASER: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "LASER BLOCKER: Doesn't let DRAGGIN & SPINNING LASER and PLASMA TURRET reach tees through it."; + break; + case TILE_THROUGH: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HOOKTHROUGH: Combined with (UN)HOOKABLE tiles, allows to hook through the walls."; + break; + case TILE_JUMP: + if(Layer == LAYER_SWITCH) + return "JUMP: Sets defined amount of jumps (default is 2)."; + break; + case TILE_FREEZE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "FREEZE: Freezes tees for 3 seconds."; + if(Layer == LAYER_SWITCH) + return "FREEZE: Freezes tees for defined amount of seconds."; + break; + case TILE_UNFREEZE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "UNFREEZE: Unfreezes tees immediately."; + break; + case TILE_TELEINEVIL: + if(Layer == LAYER_TELE) + return "EVIL TELEPORT: After falling into this tile, tees appear on TO with the same number. Speed and hooks are deleted."; + break; + case TILE_DFREEZE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DEEP FREEZE: Permanent freeze. Only UNDEEP tile can cancel this effect."; + break; + case TILE_DUNFREEZE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "UNDEEP: Removes DEEP FREEZE effect."; + break; + case TILE_TELEINWEAPON: + if(Layer == LAYER_TELE) + return "WEAPON TELEPORT: Teleports bullets shot into it to TELEPORT TO, where it comes out. Direction, angle and length are kept."; + break; + case TILE_TELEINHOOK: + if(Layer == LAYER_TELE) + return "HOOK TELEPORT: Teleports hooks entered into it to TELEPORT TO, where it comes out. Direction, angle and length are kept."; + break; + case TILE_WALLJUMP: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "WALLJUMP: Placed next to a wall. Enables to climb up the wall."; + break; + case TILE_EHOOK_START: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "ENDLESS HOOK: Endless hook has been activated."; + break; + case TILE_EHOOK_END: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "ENDLESS HOOK: Endless hook has been deactivated."; + break; + case TILE_HIT_START: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HIT OTHERS: You can hit others."; + if(Layer == LAYER_SWITCH) + return "HIT OTHERS: You can activate hitting others for single weapons."; + break; + case TILE_HIT_END: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HIT OTHERS: You can't hit others."; + if(Layer == LAYER_SWITCH) + return "HIT OTHERS: You can deactivate hitting others for single weapons."; + break; + case TILE_SOLO_START: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SOLO: You are now in a solo part."; + break; + case TILE_SOLO_END: // also TILE_SWITCHTIMEDOPEN + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SOLO: You are now out of the solo part."; + if(Layer == LAYER_SWITCH) + return "TIME SWITCH: Activates switch (e.g. closes door) with the same number for set amount of seconds."; + break; + case TILE_SWITCHTIMEDCLOSE: + if(Layer == LAYER_SWITCH) + return "TIME SWITCH: Deactivates switch (e.g. opens door) with the same number for set amount of seconds."; + break; + case TILE_SWITCHOPEN: + if(Layer == LAYER_SWITCH) + return "SWITCH: Activates switch (e.g. closes door) with the same number."; + break; + case TILE_SWITCHCLOSE: + if(Layer == LAYER_SWITCH) + return "SWITCH: Deactivates switch (e.g. closes door) with the same number."; + break; + case TILE_TELEIN: + if(Layer == LAYER_TELE) + return "TELEPORT: After falling into this tile, tees appear on TO with the same number. Speed and hook are kept."; + break; + case TILE_TELEOUT: + if(Layer == LAYER_TELE) + return "TELEPORT: Teleport destination tile for FROMs, WEAPON & HOOK TELEPORTs with the same numbers."; + break; + case TILE_BOOST: + if(Layer == LAYER_SPEEDUP) + return "SPEEDUP: Gives tee defined speed. Arrow shows direction and angle."; + break; + case TILE_TELECHECK: + if(Layer == LAYER_TELE) + return "CHECKPOINT TELEPORT: After having touched this tile, any CFRM will teleport you to CTO with the same number."; + break; + case TILE_TELECHECKOUT: + if(Layer == LAYER_TELE) + return "CHECKPOINT TELEPORT: Here tees will appear after touching TELEPORT CHECKPOINT with the same number and falling into CFROM TELEPORT."; + break; + case TILE_TELECHECKIN: + if(Layer == LAYER_TELE) + return "CHECKPOINT TELEPORT: Sends tees to CTO with the same number as the last touched TELEPORT CHECKPOINT. Speed and hook are kept."; + break; + case TILE_REFILL_JUMPS: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "REFILL JUMPS: Restores all jumps."; + break; + case TILE_BEGIN: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "START: Starts counting your race time."; + break; + case TILE_END: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "FINISH: End of race."; + break; + case TILE_STOP: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "STOPPER: You can hook and shoot through it. You can't go through it against the arrow."; + break; + case TILE_STOPS: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "STOPPER: You can hook and shoot through it. You can't go through it against the arrows."; + break; + case TILE_STOPA: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "STOPPER: You can hook and shoot through it. You can't go through it."; + break; + case TILE_TELECHECKINEVIL: + if(Layer == LAYER_TELE) + return "CHECKPOINT EVIL TELE: Send tees to CTO with the same number as the last touched TELEPORT CHECKPOINT. Speed and hook are deleted."; + break; + case TILE_CP: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SPEEDER: Causes weapons, SHIELD, HEART and SPINNING LASER to move slowly."; + break; + case TILE_CP_F: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SPEEDER: Causes weapons, SHIELD, HEART and SPINNING LASER to move quickly."; + break; + case TILE_TUNE1: + if(Layer == LAYER_TUNE) + return "TUNE ZONE: Area where defined tunes work."; + break; + case TILE_OLDLASER: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "OLD LASER: Shotgun drags others always towards the shooter, even after having bounced. Shooter can't hit themselves. Place only one tile somewhere on the map."; + break; + case TILE_NPC: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "COLLISION OFF: Nobody can collide with others. Place only one tile somewhere on the map."; + break; + case TILE_EHOOK: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "ENDLESS HOOK ON: Everyone has endless hook. Place only one tile somewhere on the map."; + break; + case TILE_NOHIT: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HIT OTHERS OFF: Nobody can hit others. Place only one tile somewhere on the map."; + break; + case TILE_NPH: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HOOK OTHERS OFF: Nobody can hook others. Place only one tile somewhere on the map."; + break; + case TILE_UNLOCK_TEAM: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SPEEDER: Causes weapons, SHIELD, HEART and SPINNING LASER to move quickly."; + break; + case TILE_PENALTY: + if(Layer == LAYER_SWITCH) + return "PENALTY: Adds time to your current race time. Opposite of BONUS."; + break; + case TILE_NPC_END: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "COLLISION: You can't collide with others."; + break; + case TILE_SUPER_END: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SUPER JUMP: You don't have unlimited air jumps."; + break; + case TILE_JETPACK_END: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "JETPACK: You lost your jetpack gun."; + break; + case TILE_NPH_END: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HOOK OTHERS: You can't hook others."; + break; + case TILE_BONUS: + if(Layer == LAYER_SWITCH) + return "BONUS: Subtracts time from your current race time. Opposite of PENALTY."; + break; + case TILE_NPC_START: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "COLLISION: You can collide with others."; + break; + case TILE_SUPER_START: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SUPER JUMP: You have unlimited air jumps."; + break; + case TILE_JETPACK_START: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "JETPACK: You have a jetpack gun."; + break; + case TILE_NPH_START: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HOOK OTHERS: You can hook others."; + break; + case TILE_CREDITS_1: + case TILE_CREDITS_2: + case TILE_CREDITS_3: + case TILE_CREDITS_4: + case TILE_CREDITS_5: + case TILE_CREDITS_6: + case TILE_CREDITS_7: + case TILE_CREDITS_8: + return "CREDITS: Who designed the entities."; + case TILE_ENTITIES_OFF_1: + case TILE_ENTITIES_OFF_2: + return "ENTITIES OFF SIGN: Informs people playing with entities about important marks, tips, information or text on the map."; + // Entities + case ENTITY_OFFSET + ENTITY_SPAWN: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SPAWN: Here tees will appear after joining the game or dying somewhere on the map."; + break; + case ENTITY_OFFSET + ENTITY_SPAWN_RED: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SPAWN: Not used in DDRace. Here spawn red team members."; + break; + case ENTITY_OFFSET + ENTITY_SPAWN_BLUE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "SPAWN: Not used in DDRace. Here spawn blue team members."; + break; + case ENTITY_OFFSET + ENTITY_FLAGSTAND_RED: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "FLAG: Not used in DDRace. Place where red team flag is."; + break; + case ENTITY_OFFSET + ENTITY_FLAGSTAND_BLUE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "FLAG: Not used in DDRace. Place where red team blue is."; + break; + case ENTITY_OFFSET + ENTITY_ARMOR_1: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SHIELD: Takes all weapons (except hammer and pistol) away."; + break; + case ENTITY_OFFSET + ENTITY_HEALTH_1: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "HEART: Works like a FREEZE tile. Freezes tees for 3 seconds by default."; + break; + case ENTITY_OFFSET + ENTITY_WEAPON_SHOTGUN: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SHOTGUN: Drags the tees towards it. Bounces off the walls."; + break; + case ENTITY_OFFSET + ENTITY_WEAPON_GRENADE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "GRENADE LAUNCHER: Throws exploding bullets. Also known as rocket."; + break; + case ENTITY_OFFSET + ENTITY_POWERUP_NINJA: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "NINJA: Makes you invisible in the darkest nights."; + break; + case ENTITY_OFFSET + ENTITY_WEAPON_RIFLE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "RIFLE: Unfreezes the tee. Bounces off the walls. Also known as laser."; + break; + case ENTITY_OFFSET + ENTITY_LASER_FAST_CCW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SPINNING LASER: Tile where freezing laser (made with LASER LENGTH) begins. Counter-Clockwise, fast."; + break; + case ENTITY_OFFSET + ENTITY_LASER_NORMAL_CCW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SPINNING LASER: Tile where freezing laser (made with LASER LENGTH) begins. Counter-Clockwise, medium speed."; + break; + case ENTITY_OFFSET + ENTITY_LASER_SLOW_CCW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SPINNING LASER: Tile where freezing laser (made with LASER LENGTH) begins. Counter-Clockwise, slow."; + break; + case ENTITY_OFFSET + ENTITY_LASER_STOP: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "NON-SPINNING LASER: Tile where freezing laser (made with LASER LENGTH) begins."; + break; + case ENTITY_OFFSET + ENTITY_LASER_SLOW_CW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SPINNING LASER: Tile where freezing laser (made with LASER LENGTH) begins. Clockwise, slow."; + break; + case ENTITY_OFFSET + ENTITY_LASER_NORMAL_CW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SPINNING LASER: Tile where freezing laser (made with LASER LENGTH) begins. Clockwise, medium speed."; + break; + case ENTITY_OFFSET + ENTITY_LASER_FAST_CW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "SPINNING LASER: Tile where freezing laser (made with LASER LENGTH) begins. Clockwise, fast."; + break; + case ENTITY_OFFSET + ENTITY_LASER_SHORT: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH: Combined with DOOR or SPINNING LASER, makes it 3 tiles long."; + break; + case ENTITY_OFFSET + ENTITY_LASER_MEDIUM: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH: Combined with DOOR or SPINNING LASER, makes it 6 tiles long."; + break; + case ENTITY_OFFSET + ENTITY_LASER_LONG: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH: Combined with DOOR or SPINNING LASER, makes it 9 tiles long."; + break; + case ENTITY_OFFSET + ENTITY_LASER_C_SLOW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, slow."; + break; + case ENTITY_OFFSET + ENTITY_LASER_C_NORMAL: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, medium speed."; + break; + case ENTITY_OFFSET + ENTITY_LASER_C_FAST: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, fast."; + break; + case ENTITY_OFFSET + ENTITY_LASER_O_SLOW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, slow."; + break; + case ENTITY_OFFSET + ENTITY_LASER_O_NORMAL: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, medium speed."; + break; + case ENTITY_OFFSET + ENTITY_LASER_O_FAST: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, fast."; + break; + case ENTITY_OFFSET + ENTITY_PLASMAE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "PLASMA TURRET: Shoots plasma bullets at the closest tee. They explode on an obstactle they hit (wall or tee)."; + break; + case ENTITY_OFFSET + ENTITY_PLASMAF: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "PLASMA TURRET: Shoots plasma bullets that work like FREEZE at the closest tee."; + break; + case ENTITY_OFFSET + ENTITY_PLASMA: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "PLASMA TURRET: Shoots plasma bullets that work like FREEZE at the closest tee. They also explode on an obstactly they hit (wall or tee)."; + break; + case ENTITY_OFFSET + ENTITY_PLASMAU: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "PLASMA TURRET: Shoots plasma bullets that work like UNFREEZE at the closest tee."; + break; + case ENTITY_OFFSET + ENTITY_CRAZY_SHOTGUN_EX: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "EXPLODING BULLET: Bounces off the walls with explosion. Touching the bullet works like FREEZE tile (freezes for 3 seconds by default)."; + break; + case ENTITY_OFFSET + ENTITY_CRAZY_SHOTGUN: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "EXPLODING BULLET: Bounces off the walls without explosion. Touching the bullet works like FREEZE tile (freezes for 3 seconds by default)."; + break; + case ENTITY_OFFSET + ENTITY_DRAGGER_WEAK: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DRAGGING LASER: Grabs and attracts the closest tee to it. Can't reach tees through walls and LASER BLOCKER. Weak."; + break; + case ENTITY_OFFSET + ENTITY_DRAGGER_NORMAL: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DRAGGING LASER: Grabs and attracts the closest tee to it. Can't reach tees through walls and LASER BLOCKER. Medium strength."; + break; + case ENTITY_OFFSET + ENTITY_DRAGGER_STRONG: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DRAGGING LASER: Grabs and attracts the closest tee to it. Can't reach tees through walls and LASER BLOCKER. Strong."; + break; + case ENTITY_OFFSET + ENTITY_DRAGGER_WEAK_NW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DRAGGING LASER: Grabs and attracts the closest tee to it. Can reach tees through walls but not through LASER BLOCKER. Weak."; + break; + case ENTITY_OFFSET + ENTITY_DRAGGER_NORMAL_NW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DRAGGING LASER: Grabs and attracts the closest tee to it. Can reach tees through walls but not through LASER BLOCKER. Medium strength."; + break; + case ENTITY_OFFSET + ENTITY_DRAGGER_STRONG_NW: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DRAGGING LASER: Grabs and attracts the closest tee to it. Can reach tees through walls but not through LASER BLOCKER. Strong."; + break; + case ENTITY_OFFSET + ENTITY_DOOR: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) + return "DOOR: Combined with LASER LENGTH creates doors. Doesn't allow to go through it (only with NINJA)."; + break; + // TODO: Explain portal tiles + case TILE_TELE_GUN_ENABLE: return ""; + case TILE_TELE_GUN_DISABLE: return ""; + case TILE_ALLOW_TELE_GUN: return ""; + case TILE_ALLOW_BLUE_TELE_GUN: return ""; + case TILE_TELE_GRENADE_ENABLE: return ""; + case TILE_TELE_GRENADE_DISABLE: return ""; + case TILE_TELE_LASER_ENABLE: return ""; + case TILE_TELE_LASER_DISABLE: return ""; + } + if(Tile >= TILE_CHECKPOINT_FIRST && Tile <= TILE_CHECKPOINT_LAST && (Layer == LAYER_GAME || Layer == LAYER_FRONT)) + return "TIME CHECKPOINT: Compares your current race time with your record to show you whether you are running faster or slower."; + return ""; +} diff --git a/src/game/mapitems.h b/src/game/mapitems.h index a217761c8..57e4504b5 100644 --- a/src/game/mapitems.h +++ b/src/game/mapitems.h @@ -56,13 +56,13 @@ enum ENTITY_POWERUP_NINJA, ENTITY_WEAPON_RIFLE, //DDRace - Main Lasers - ENTITY_LASER_FAST_CW, - ENTITY_LASER_NORMAL_CW, - ENTITY_LASER_SLOW_CW, - ENTITY_LASER_STOP, - ENTITY_LASER_SLOW_CCW, - ENTITY_LASER_NORMAL_CCW, ENTITY_LASER_FAST_CCW, + ENTITY_LASER_NORMAL_CCW, + ENTITY_LASER_SLOW_CCW, + ENTITY_LASER_STOP, + ENTITY_LASER_SLOW_CW, + ENTITY_LASER_NORMAL_CW, + ENTITY_LASER_FAST_CW, //DDRace - Laser Modifiers ENTITY_LASER_SHORT, ENTITY_LASER_MEDIUM, @@ -131,6 +131,8 @@ enum TILE_REFILL_JUMPS = 32, TILE_BEGIN, TILE_END, + TILE_CHECKPOINT_FIRST = 35, + TILE_CHECKPOINT_LAST = 59, TILE_STOP = 60, TILE_STOPS, TILE_STOPA, @@ -164,6 +166,14 @@ enum TILE_TELE_GRENADE_DISABLE = 113, TILE_TELE_LASER_ENABLE = 128, TILE_TELE_LASER_DISABLE = 129, + TILE_CREDITS_1 = 140, + TILE_CREDITS_2 = 141, + TILE_CREDITS_3 = 142, + TILE_CREDITS_4 = 143, + TILE_CREDITS_5 = 156, + TILE_CREDITS_6 = 157, + TILE_CREDITS_7 = 158, + TILE_CREDITS_8 = 159, TILE_ENTITIES_OFF_1 = 190, TILE_ENTITIES_OFF_2, //End of higher tiles diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp index 79e247e4d..6aa462cbf 100644 --- a/src/game/server/gamecontroller.cpp +++ b/src/game/server/gamecontroller.cpp @@ -270,7 +270,7 @@ bool IGameController::OnEntity(int Index, vec2 Pos, int Layer, int Flags, int Nu Type = POWERUP_NINJA; SubType = WEAPON_NINJA; } - else if(Index >= ENTITY_LASER_FAST_CW && Index <= ENTITY_LASER_FAST_CCW) + else if(Index >= ENTITY_LASER_FAST_CCW && Index <= ENTITY_LASER_FAST_CW) { int sides2[8]; sides2[0]=GameServer()->Collision()->Entity(x, y + 2, Layer); From 05fe69751de52bf207b4b25cf6df9ac0d6fa2746 Mon Sep 17 00:00:00 2001 From: def Date: Mon, 8 Apr 2019 22:36:47 +0200 Subject: [PATCH 2/4] Add jao's explanations for telegun --- src/game/editor/explanations.cpp | 45 +++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/src/game/editor/explanations.cpp b/src/game/editor/explanations.cpp index 90e84ece4..e6b553f7d 100644 --- a/src/game/editor/explanations.cpp +++ b/src/game/editor/explanations.cpp @@ -408,15 +408,42 @@ const char *CEditor::Explain(int Tile, int Layer) if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) return "DOOR: Combined with LASER LENGTH creates doors. Doesn't allow to go through it (only with NINJA)."; break; - // TODO: Explain portal tiles - case TILE_TELE_GUN_ENABLE: return ""; - case TILE_TELE_GUN_DISABLE: return ""; - case TILE_ALLOW_TELE_GUN: return ""; - case TILE_ALLOW_BLUE_TELE_GUN: return ""; - case TILE_TELE_GRENADE_ENABLE: return ""; - case TILE_TELE_GRENADE_DISABLE: return ""; - case TILE_TELE_LASER_ENABLE: return ""; - case TILE_TELE_LASER_DISABLE: return ""; + case TILE_TELE_GUN_ENABLE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "TELEGUN: Turn gun on as telegun weapon."; + break; + case TILE_TELE_GUN_DISABLE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "TELEGUN: Turn gun off as telegun weapon."; + break; + case TILE_ALLOW_TELE_GUN: + if(Layer == LAYER_FRONT) + return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, cancels movement."; + if(Layer == LAYER_SWITCH) + return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, cancels movement, for single weapons."; + break; + case TILE_ALLOW_BLUE_TELE_GUN: + if(Layer == LAYER_FRONT) + return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, preserves movement."; + if(Layer == LAYER_SWITCH) + return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, preserves movement, for single weapons."; + break; + case TILE_TELE_GRENADE_ENABLE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "TELEGUN: Turn grenade on as telegun weapon."; + break; + case TILE_TELE_GRENADE_DISABLE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "TELEGUN: Turn grenade off as telegun weapon."; + break; + case TILE_TELE_LASER_ENABLE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "TELEGUN: Turn laser on as telegun weapon."; + break; + case TILE_TELE_LASER_DISABLE: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "TELEGUN: Turn laser off as telegun weapon."; + break; } if(Tile >= TILE_CHECKPOINT_FIRST && Tile <= TILE_CHECKPOINT_LAST && (Layer == LAYER_GAME || Layer == LAYER_FRONT)) return "TIME CHECKPOINT: Compares your current race time with your record to show you whether you are running faster or slower."; From bdb579330d74d98d977fde6921d9b1238c974ffb Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Tue, 9 Apr 2019 14:23:37 +0200 Subject: [PATCH 3/4] Improve game tile explanations a bit As suggested by Bojidar and jao --- src/game/editor/explanations.cpp | 90 ++++++++++++++++---------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/game/editor/explanations.cpp b/src/game/editor/explanations.cpp index e6b553f7d..9bf5805a2 100644 --- a/src/game/editor/explanations.cpp +++ b/src/game/editor/explanations.cpp @@ -43,7 +43,7 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_TELEINEVIL: if(Layer == LAYER_TELE) - return "EVIL TELEPORT: After falling into this tile, tees appear on TO with the same number. Speed and hooks are deleted."; + return "RED TELEPORT: After falling into this tile, tees appear on TO with the same number. Speed and hooks are reset."; break; case TILE_DFREEZE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) @@ -59,31 +59,31 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_TELEINHOOK: if(Layer == LAYER_TELE) - return "HOOK TELEPORT: Teleports hooks entered into it to TELEPORT TO, where it comes out. Direction, angle and length are kept."; + return "HOOK TELEPORT: Teleports hooks entering into it to TELEPORT TO, where it comes out. Direction, angle and length are kept."; break; case TILE_WALLJUMP: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "WALLJUMP: Placed next to a wall. Enables to climb up the wall."; + return "WALLJUMP: Placed next to a wall. Enables climbing up the wall."; break; case TILE_EHOOK_START: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "ENDLESS HOOK: Endless hook has been activated."; + return "ENDLESS HOOK: Activates endless hook."; break; case TILE_EHOOK_END: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "ENDLESS HOOK: Endless hook has been deactivated."; + return "ENDLESS HOOK OFF: Deactivates endless hook."; break; case TILE_HIT_START: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) return "HIT OTHERS: You can hit others."; if(Layer == LAYER_SWITCH) - return "HIT OTHERS: You can activate hitting others for single weapons."; + return "HIT OTHERS: You can activate hitting others for single weapons, using delay number to select which."; break; case TILE_HIT_END: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) return "HIT OTHERS: You can't hit others."; if(Layer == LAYER_SWITCH) - return "HIT OTHERS: You can deactivate hitting others for single weapons."; + return "HIT OTHERS: You can deactivate hitting others for single weapons, using delay number to select which."; break; case TILE_SOLO_START: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) @@ -93,11 +93,11 @@ const char *CEditor::Explain(int Tile, int Layer) if(Layer == LAYER_GAME || Layer == LAYER_FRONT) return "SOLO: You are now out of the solo part."; if(Layer == LAYER_SWITCH) - return "TIME SWITCH: Activates switch (e.g. closes door) with the same number for set amount of seconds."; + return "TIME SWITCH: Activates switch (e.g. closes door) with the same number for a set amount of seconds."; break; case TILE_SWITCHTIMEDCLOSE: if(Layer == LAYER_SWITCH) - return "TIME SWITCH: Deactivates switch (e.g. opens door) with the same number for set amount of seconds."; + return "TIME SWITCH: Deactivates switch (e.g. opens door) with the same number for a set amount of seconds."; break; case TILE_SWITCHOPEN: if(Layer == LAYER_SWITCH) @@ -105,15 +105,15 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_SWITCHCLOSE: if(Layer == LAYER_SWITCH) - return "SWITCH: Deactivates switch (e.g. closes door) with the same number."; + return "SWITCH: Deactivates switch (e.g. opens door) with the same number."; break; case TILE_TELEIN: if(Layer == LAYER_TELE) - return "TELEPORT: After falling into this tile, tees appear on TO with the same number. Speed and hook are kept."; + return "BLUE TELEPORT: After falling into this tile, tees appear on TO with the same number. Speed and hook are kept."; break; case TILE_TELEOUT: if(Layer == LAYER_TELE) - return "TELEPORT: Teleport destination tile for FROMs, WEAPON & HOOK TELEPORTs with the same numbers."; + return "TELEPORT TO: Destination tile for FROMs, WEAPON & HOOK TELEPORTs with the same numbers."; break; case TILE_BOOST: if(Layer == LAYER_SPEEDUP) @@ -125,11 +125,11 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_TELECHECKOUT: if(Layer == LAYER_TELE) - return "CHECKPOINT TELEPORT: Here tees will appear after touching TELEPORT CHECKPOINT with the same number and falling into CFROM TELEPORT."; + return "CHECKPOINT TELEPORT TO: Tees will appear here after touching TELEPORT CHECKPOINT with the same number and falling into CFROM TELEPORT."; break; case TILE_TELECHECKIN: if(Layer == LAYER_TELE) - return "CHECKPOINT TELEPORT: Sends tees to CTO with the same number as the last touched TELEPORT CHECKPOINT. Speed and hook are kept."; + return "BLUE CHECKPOINT TELEPORT: Sends tees to CTO with the same number as the last touched TELEPORT CHECKPOINT. Speed and hook are kept."; break; case TILE_REFILL_JUMPS: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) @@ -157,7 +157,7 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_TELECHECKINEVIL: if(Layer == LAYER_TELE) - return "CHECKPOINT EVIL TELE: Send tees to CTO with the same number as the last touched TELEPORT CHECKPOINT. Speed and hook are deleted."; + return "RED CHECKPOINT TELEPORT: Send tees to CTO with the same number as the last touched TELEPORT CHECKPOINT. Speed and hook are reset."; break; case TILE_CP: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) @@ -173,27 +173,27 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_OLDLASER: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "OLD LASER: Shotgun drags others always towards the shooter, even after having bounced. Shooter can't hit themselves. Place only one tile somewhere on the map."; + return "GLOBAL OLD SHOTGUN: Shotgun drags others always towards the shooter, even after having bounced. Shooter can't hit themselves. Place only one tile somewhere on the map."; break; case TILE_NPC: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "COLLISION OFF: Nobody can collide with others. Place only one tile somewhere on the map."; + return "GLOBAL COLLISION OFF: Nobody can collide with others. Place only one tile somewhere on the map."; break; case TILE_EHOOK: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "ENDLESS HOOK ON: Everyone has endless hook. Place only one tile somewhere on the map."; + return "GLOBAL ENDLESS HOOK ON: Everyone has endless hook. Place only one tile somewhere on the map."; break; case TILE_NOHIT: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "HIT OTHERS OFF: Nobody can hit others. Place only one tile somewhere on the map."; + return "GLOBAL HIT OTHERS OFF: Nobody can hit others. Place only one tile somewhere on the map."; break; case TILE_NPH: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "HOOK OTHERS OFF: Nobody can hook others. Place only one tile somewhere on the map."; + return "GLOBAL HOOK OTHERS OFF: Nobody can hook others. Place only one tile somewhere on the map."; break; case TILE_UNLOCK_TEAM: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "SPEEDER: Causes weapons, SHIELD, HEART and SPINNING LASER to move quickly."; + return "UNLOCK TEAM: Forces team to be unlocked so that team doesn't get killed when one dies."; break; case TILE_PENALTY: if(Layer == LAYER_SWITCH) @@ -201,19 +201,19 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_NPC_END: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "COLLISION: You can't collide with others."; + return "COLLISION OFF: You can't collide with others."; break; case TILE_SUPER_END: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "SUPER JUMP: You don't have unlimited air jumps."; + return "SUPER JUMP OFF: You don't have unlimited air jumps."; break; case TILE_JETPACK_END: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "JETPACK: You lost your jetpack gun."; + return "JETPACK OFF: You lose your jetpack gun."; break; case TILE_NPH_END: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "HOOK OTHERS: You can't hook others."; + return "HOOK OTHERS OFF: You can't hook others."; break; case TILE_BONUS: if(Layer == LAYER_SWITCH) @@ -254,11 +254,11 @@ const char *CEditor::Explain(int Tile, int Layer) break; case ENTITY_OFFSET + ENTITY_SPAWN_RED: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "SPAWN: Not used in DDRace. Here spawn red team members."; + return "SPAWN: Red team members spawn here, same as normal spawn in DDRace."; break; case ENTITY_OFFSET + ENTITY_SPAWN_BLUE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "SPAWN: Not used in DDRace. Here spawn blue team members."; + return "SPAWN: Blue team members spawn here, same as normal spawn in DDRace."; break; case ENTITY_OFFSET + ENTITY_FLAGSTAND_RED: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) @@ -266,7 +266,7 @@ const char *CEditor::Explain(int Tile, int Layer) break; case ENTITY_OFFSET + ENTITY_FLAGSTAND_BLUE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "FLAG: Not used in DDRace. Place where red team blue is."; + return "FLAG: Not used in DDRace. Place where blue team flag is."; break; case ENTITY_OFFSET + ENTITY_ARMOR_1: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) @@ -290,7 +290,7 @@ const char *CEditor::Explain(int Tile, int Layer) break; case ENTITY_OFFSET + ENTITY_WEAPON_RIFLE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "RIFLE: Unfreezes the tee. Bounces off the walls. Also known as laser."; + return "RIFLE: Unfreezes hit tee. Bounces off the walls. Also known as laser."; break; case ENTITY_OFFSET + ENTITY_LASER_FAST_CCW: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) @@ -322,39 +322,39 @@ const char *CEditor::Explain(int Tile, int Layer) break; case ENTITY_OFFSET + ENTITY_LASER_SHORT: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH: Combined with DOOR or SPINNING LASER, makes it 3 tiles long."; + return "LASER LENGTH: Put next to DOOR or SPINNING LASER, makes it 3 tiles long."; break; case ENTITY_OFFSET + ENTITY_LASER_MEDIUM: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH: Combined with DOOR or SPINNING LASER, makes it 6 tiles long."; + return "LASER LENGTH: Put next to DOOR or SPINNING LASER, makes it 6 tiles long."; break; case ENTITY_OFFSET + ENTITY_LASER_LONG: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH: Combined with DOOR or SPINNING LASER, makes it 9 tiles long."; + return "LASER LENGTH: Put next to DOOR or SPINNING LASER, makes it 9 tiles long."; break; case ENTITY_OFFSET + ENTITY_LASER_C_SLOW: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, slow."; + return "LASER LENGTH CHANGE: Put next to LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, slow."; break; case ENTITY_OFFSET + ENTITY_LASER_C_NORMAL: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, medium speed."; + return "LASER LENGTH CHANGE: Put next to LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, medium speed."; break; case ENTITY_OFFSET + ENTITY_LASER_C_FAST: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, fast."; + return "LASER LENGTH CHANGE: Put next to LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Lengthen, fast."; break; case ENTITY_OFFSET + ENTITY_LASER_O_SLOW: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, slow."; + return "LASER LENGTH CHANGE: Put next to LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, slow."; break; case ENTITY_OFFSET + ENTITY_LASER_O_NORMAL: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, medium speed."; + return "LASER LENGTH CHANGE: Put next to LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, medium speed."; break; case ENTITY_OFFSET + ENTITY_LASER_O_FAST: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) - return "LASER LENGTH CHANGE: Combined with LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, fast."; + return "LASER LENGTH CHANGE: Put next to LASER LENGTH, causes it to length and shorten constantly. Works only on (NON-)SPINNING LASER, not on DOOR. Shorten, fast."; break; case ENTITY_OFFSET + ENTITY_PLASMAE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH) @@ -414,35 +414,35 @@ const char *CEditor::Explain(int Tile, int Layer) break; case TILE_TELE_GUN_DISABLE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "TELEGUN: Turn gun off as telegun weapon."; + return "TELEGUN OFF: Turn gun off as telegun weapon."; break; case TILE_ALLOW_TELE_GUN: if(Layer == LAYER_FRONT) return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, cancels movement."; if(Layer == LAYER_SWITCH) - return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, cancels movement, for single weapons."; + return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, cancels movement, for single weapons, using delay number to select which."; break; case TILE_ALLOW_BLUE_TELE_GUN: if(Layer == LAYER_FRONT) return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, preserves movement."; if(Layer == LAYER_SWITCH) - return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, preserves movement, for single weapons."; + return "TELEGUN: Place on top of a collision tile, activates a spot to teleport to, preserves movement, for single weapons, using delay number to select which."; break; case TILE_TELE_GRENADE_ENABLE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "TELEGUN: Turn grenade on as telegun weapon."; + return "TELEGRENADE: Turn grenade on as telegun weapon."; break; case TILE_TELE_GRENADE_DISABLE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "TELEGUN: Turn grenade off as telegun weapon."; + return "TELEGRENADE OFF: Turn grenade off as telegun weapon."; break; case TILE_TELE_LASER_ENABLE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "TELEGUN: Turn laser on as telegun weapon."; + return "TELELASER: Turn laser on as telegun weapon."; break; case TILE_TELE_LASER_DISABLE: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) - return "TELEGUN: Turn laser off as telegun weapon."; + return "TELELASER OFF: Turn laser off as telegun weapon."; break; } if(Tile >= TILE_CHECKPOINT_FIRST && Tile <= TILE_CHECKPOINT_LAST && (Layer == LAYER_GAME || Layer == LAYER_FRONT)) From 2d69935a6ba1a1fc65e515815b9982da31c1f1a3 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Wed, 10 Apr 2019 15:48:23 +0200 Subject: [PATCH 4/4] Add explanations for TILE_THROUGH_CUT/ALL/DIR --- src/game/editor/explanations.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/editor/explanations.cpp b/src/game/editor/explanations.cpp index 9bf5805a2..de32f98fc 100644 --- a/src/game/editor/explanations.cpp +++ b/src/game/editor/explanations.cpp @@ -23,6 +23,15 @@ const char *CEditor::Explain(int Tile, int Layer) if(Layer == LAYER_GAME || Layer == LAYER_FRONT) return "LASER BLOCKER: Doesn't let DRAGGIN & SPINNING LASER and PLASMA TURRET reach tees through it."; break; + case TILE_THROUGH_CUT: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HOOKTRHOUGH: Shortcut for new hookthrough."; + case TILE_THROUGH_ALL: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HOOKTRHOUGH: Combined with collision tile is new hookthrough, otherwise stops hooks, from all directions."; + case TILE_THROUGH_DIR: + if(Layer == LAYER_GAME || Layer == LAYER_FRONT) + return "HOOKTRHOUGH: Combined with a collision tile is new hookthrough, otherwise stops hook, from one direction."; case TILE_THROUGH: if(Layer == LAYER_GAME || Layer == LAYER_FRONT) return "HOOKTHROUGH: Combined with (UN)HOOKABLE tiles, allows to hook through the walls.";