Logs finishing tank transfer valve bombs and ghosting. Changes pAI request

to state the name of the inquirer.
This commit is contained in:
Hubblenaut
2014-08-14 01:03:31 +02:00
parent 5a785ee866
commit c80b921d6b
3 changed files with 11 additions and 5 deletions

View File

@@ -31,6 +31,8 @@
user.drop_item()
item.loc = src
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
message_admins("[key_name_admin(user)] attached both tanks to a transfer valve.")
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
update_icon()
nanomanager.update_uis(src) // update all UIs attached to src
@@ -66,7 +68,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
// this is the data which will be sent to the ui
@@ -77,13 +79,13 @@
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick

View File

@@ -170,6 +170,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost") return //didn't want to ghost after-all
resting = 1
message_admins("[key_name_admin(usr)] has ghosted.")
log_game("[key_name_admin(usr)] has ghosted.")
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
return

View File

@@ -19,6 +19,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
/datum/paiController
var/inquirer = null
var/list/pai_candidates = list()
var/list/asked = list()
@@ -224,6 +225,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
M << browse(dat, "window=paiRecruit;size=580x580;")
proc/findPAI(var/obj/item/device/paicard/p, var/mob/user)
inquirer = user
requestRecruits()
var/list/available = list()
for(var/datum/paiCandidate/c in paiController.pai_candidates)
@@ -363,7 +365,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(!C) return
asked.Add(C.key)
asked[C.key] = world.time
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
var/response = alert(C, "[inquirer] is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
@@ -372,4 +374,4 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(warning == "Yes")
asked[C.key] = INFINITY
else
question(C)
question(C)