diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 7246e005341..015fea2f247 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -18,7 +18,7 @@ delete_me = 1 return if("start") - newplayer_start += loc + newplayer_start = get_turf(loc) delete_me = 1 return if("JoinLate") diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 4a21ca619d0..97b2fd19acc 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -24,6 +24,9 @@ if (R.module) for (var/obj/item/weapon/tank/jetpack/J in R.module.modules) return J + // Synthetic jetpacks don't install into modules. They go into contents. + for (var/obj/item/weapon/tank/jetpack/J in R.contents) + return J return null diff --git a/code/global.dm b/code/global.dm index 0186ea206d4..799e1b95472 100644 --- a/code/global.dm +++ b/code/global.dm @@ -58,7 +58,7 @@ var/list/reg_dna = list() var/list/monkeystart = list() var/list/wizardstart = list() -var/list/newplayer_start = list() +var/turf/newplayer_start = null //Spawnpoints. var/list/latejoin = list() diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 575a65ab4e1..9f647814784 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -47,7 +47,6 @@ var/list/jobban_keylist = list() // Global jobban list. else jobban_loaddatabase() - testing("Database: [json_encode(jobban_keylist)]") return 1 /** diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 332e0f80416..770052fba15 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -295,7 +295,7 @@ // New player, and we don't want any. if (!holder) - if (config.access_deny_new_players && !player_age) + if (config.access_deny_new_players && player_age == -1) log_access("Failed Login: [key] [computer_id] [address] - New player attempting connection during panic bunker.", ckey = ckey) message_admins("Failed Login: [key] [computer_id] [address] - New player attempting connection during panic bunker.") to_chat(src, "Apologies, but the server is currently not accepting connections from never before seen players.") @@ -450,10 +450,13 @@ //Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables var/DBQuery/query_update = dbcon.NewQuery("UPDATE ss13_player SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]', account_join_date = [account_join_date ? "'[account_join_date]'" : "NULL"] WHERE ckey = '[sql_ckey]'") query_update.Execute() - else + else if (!config.access_deny_new_players) //New player!! Need to insert all the stuff var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO ss13_player (ckey, firstseen, lastseen, ip, computerid, lastadminrank, account_join_date) VALUES ('[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]', [account_join_date ? "'[account_join_date]'" : "NULL"])") query_insert.Execute() + else + // Flag as -1 to know we have to kiiick them. + player_age = -1 if (!account_join_date) account_join_date = "Error" diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 87e36d83eb3..56efd60d1ee 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -432,10 +432,10 @@ if(chosen_species && use_species_name) // Have to recheck admin due to no usr at roundstart. Latejoins are fine though. if(is_species_whitelisted(chosen_species) || has_admin_rights()) - new_character = new(null, use_species_name) + new_character = new(newplayer_start, use_species_name) if(!new_character) - new_character = new(null) + new_character = new(newplayer_start) new_character.lastarea = get_area(loc) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 37caefa8fc8..95a4613bdbb 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -172,23 +172,26 @@ * invoked with the second argument being TRUE. As opposed to the default value, FALSE. * * @param below The turf that the mob is expected to end up at. + * @param dest The tile we're presuming the mob to be at for this check. Default + * value is src.loc, (src. is important there!) but this is used for magboot lookahead + * checks it turf/simulated/open/Enter(). * * @return TRUE if the atom can continue falling in its present situation. * FALSE if it should stop falling and not invoke fall_through or fall_impact * this cycle. */ -/atom/movable/proc/can_fall(turf/below) +/atom/movable/proc/can_fall(turf/below, turf/simulated/open/dest = src.loc) // Anchored things don't fall. if(anchored) return FALSE // Lattices and stairs stop things from falling. - if(locate(/obj/structure/lattice, loc) || locate(/obj/structure/stairs, loc)) + if(locate(/obj/structure/lattice, dest) || locate(/obj/structure/stairs, dest)) return FALSE // See if something prevents us from falling. for(var/atom/A in below) - if(!A.CanPass(src, src.loc)) + if(!A.CanPass(src, dest)) return FALSE // True otherwise. @@ -200,7 +203,7 @@ /obj/effect/decal/cleanable/can_fall() return TRUE -/obj/item/pipe/can_fall(turf/below) +/obj/item/pipe/can_fall(turf/below, turf/simulated/open/dest = src.loc) . = ..() if((locate(/obj/structure/disposalpipe/up) in below) || locate(/obj/machinery/atmospherics/pipe/zpipe/up in below)) @@ -208,16 +211,16 @@ // Only things that stop mechas are atoms that, well, stop them. // Lattices and stairs get crushed in fall_through. -/obj/mecha/can_fall(turf/below) +/obj/mecha/can_fall(turf/below, turf/simulated/open/dest = src.loc) // See if something prevents us from falling. for(var/atom/A in below) - if(!A.CanPass(src, src.loc)) + if(!A.CanPass(src, dest)) return FALSE // True otherwise. return TRUE -/mob/living/carbon/human/can_fall() +/mob/living/carbon/human/can_fall(turf/below, turf/simulated/open/dest = src.loc) // Special condition for jetpack mounted folk! if (!restrained()) var/obj/item/weapon/tank/jetpack/thrust = GetJetpack(src) @@ -234,7 +237,7 @@ /mob/eye/can_fall() return FALSE -/mob/living/silicon/robot/can_fall() +/mob/living/silicon/robot/can_fall(turf/below, turf/simulated/open/dest = src.loc) var/obj/item/weapon/tank/jetpack/thrust = GetJetpack(src) if (thrust && thrust.stabilization_on && thrust.allow_thrust(0.02, src)) diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index e08b4b06afb..a47b00b51b7 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -45,9 +45,9 @@ // An override of turf/Enter() to make it so that magboots allow you to stop // falling off the damned rock. /turf/simulated/open/Enter(mob/living/carbon/human/mover, atom/oldloc) - if (istype(mover) && isturf(oldloc) && !istype(oldloc, /turf/simulated/open)) - if (mover.Check_Shoegrip(FALSE)) - to_chat(mover,span("notice", + if (istype(mover) && isturf(oldloc)) + if (mover.Check_Shoegrip(FALSE) && mover.can_fall(below, src)) + to_chat(mover, span("notice", "You are stopped from falling off the edge by \the [mover.shoes] you're wearing!")) return 0