Merge pull request #24368 from Cyberboss/LiterallyOnFire

Until I figure out why random keys aren't being transferred
This commit is contained in:
AnturK
2017-02-23 20:21:32 +01:00
committed by GitHub
10 changed files with 55 additions and 121 deletions
+1 -2
View File
@@ -44,8 +44,7 @@
var/outfit = null
//Only override this proc
/datum/job/proc/after_spawn(mob/living/carbon/human/H, mob/M)
//do actions on H but send messages to M as the key may not have been transferred_yet
/datum/job/proc/after_spawn(mob/living/carbon/human/H)
/datum/job/proc/announce(mob/living/carbon/human/H)
+3 -3
View File
@@ -183,7 +183,7 @@ Security Officer
var/list/available_depts = list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)
/datum/job/officer/after_spawn(mob/living/carbon/human/H, mob/M)
/datum/job/officer/after_spawn(mob/living/carbon/human/H)
// Assign department security
var/department
if(H && H.client && H.client.prefs)
@@ -255,9 +255,9 @@ var/list/available_depts = list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT
else
break
if(department)
M << "<b>You have been assigned to [department]!</b>"
H << "<b>You have been assigned to [department]!</b>"
else
M << "<b>You have not been assigned to any department. Patrol the halls and help where needed.</b>"
H << "<b>You have not been assigned to any department. Patrol the halls and help where needed.</b>"
+10 -17
View File
@@ -13,7 +13,6 @@
canmove = 0
anchored = 1 // don't get pushed around
var/mob/living/new_character //for instant transfer once the round is set up
/mob/new_player/New()
tag = "mob_[next_mob_id++]"
@@ -302,7 +301,7 @@
SSjob.AssignRole(src, rank, 1)
var/mob/living/character = create_character(TRUE) //creates the human and transfers vars and mind
var/mob/living/character = create_character() //creates the human and transfers vars and mind
var/equip = SSjob.EquipRank(character, rank, 1)
if(iscyborg(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
character = equip
@@ -423,33 +422,27 @@
popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
/mob/new_player/proc/create_character(transfer_after)
/mob/new_player/proc/create_character()
spawning = 1
close_spawn_windows()
var/mob/living/carbon/human/H = new(loc)
var/mob/living/carbon/human/new_character = new(loc)
if(config.force_random_names || jobban_isbanned(src, "appearance"))
client.prefs.random_character()
client.prefs.real_name = client.prefs.pref_species.random_name(gender,1)
client.prefs.copy_to(H)
H.dna.update_dna_identity()
client.prefs.copy_to(new_character)
new_character.dna.update_dna_identity()
if(mind)
mind.active = 0 //we wish to transfer the key manually
mind.transfer_to(H) //won't transfer key since the mind is not active
mind.transfer_to(new_character) //won't transfer key since the mind is not active
H.name = real_name
new_character.name = real_name
. = H
new_character = .
if(transfer_after)
transfer_character()
new_character.key = key //Manually transfer the key to log them in
new_character.stopLobbySound()
/mob/new_player/proc/transfer_character()
. = new_character
if(.)
new_character.key = key //Manually transfer the key to log them in
new_character.stopLobbySound()
return new_character
/mob/new_player/proc/ViewManifest()
var/dat = "<html><body>"
+5 -11
View File
@@ -287,12 +287,9 @@
qdel(src)
/mob/new_player/AIize(transfer_after)
/mob/new_player/AIize()
spawning = 1
. = ..()
new_character = .
if(!transfer_after) //name can't be set in AI/New without the client
new_character.rename_self("ai", client)
return ..()
/mob/living/carbon/human/AIize()
if (notransform)
@@ -314,7 +311,7 @@
invisibility = INVISIBILITY_MAXIMUM
return ..()
/mob/proc/AIize(transfer_after = TRUE)
/mob/proc/AIize()
if(client)
stopLobbySound()
@@ -337,13 +334,10 @@
if (sloc.name == "AI")
loc_landmark = sloc.loc
if(!transfer_after)
mind.active = FALSE
. = new /mob/living/silicon/ai(loc_landmark, null, src)
qdel(src)
return
if(transfer_after)
qdel(src)
//human -> robot
/mob/living/carbon/human/proc/Robotize(delete_items = 0)