mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 02:47:58 +01:00
Loads-a-fixes for dev (#2515)
Fixes #2488 . Fixes #2489 . Fixes the bug of dying upon spawn. Fixes new player recognition.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
delete_me = 1
|
||||
return
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
newplayer_start = get_turf(loc)
|
||||
delete_me = 1
|
||||
return
|
||||
if("JoinLate")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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()
|
||||
|
||||
@@ -47,7 +47,6 @@ var/list/jobban_keylist = list() // Global jobban list.
|
||||
else
|
||||
jobban_loaddatabase()
|
||||
|
||||
testing("Database: [json_encode(jobban_keylist)]")
|
||||
return 1
|
||||
|
||||
/**
|
||||
|
||||
@@ -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, "<span class='danger'>Apologies, but the server is currently not accepting connections from never before seen players.</span>")
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user