//Unlocked Saloon Doors by Captain France, although actually most of this code comes from Rose Gold Amy in the Lost And Found //and looking around Discord and stuff for how saloon doors work. //Credits: Me, putting the stuff together and changing some buttons and flags //Rose Gold Amy in Lost And Found, don't know the etiquette for crediting a Lost And Found mod //CL_Xian.pk3 on Discord for the line of code that changes all the saloon doors, although I changed it from "null" to "ambush" //Breaking out of minecarts, adapted from Rose Gold Amy. Currently bound to Custom3, line 12 if you want to change that. addHook("PlayerThink", function(player) if player.powers[pw_carry] local cr = player.powers[pw_carry] if (player.cmd.buttons & BT_CUSTOM3) if cr == CR_MINECART player.mo.tracer.target = nil P_KillMobj(player.mo.tracer, player.mo, inflictor, 0) player.mo.tracer = nil player.powers[pw_carry] = CR_NONE player.mo.state = S_PLAY_JUMP end end end end) //Checks saloon doors at spawn and makes them openable by players. Adapted from code by CL_Xian.pk3 on discord addHook("MobjSpawn", function(mo) mo.flags2 = $|MF2_AMBUSH mo.flags2 = $|MTF_AMBUSH end, MT_SALOONDOORCENTER)