This commit is contained in:
Fox-McCloud
2016-04-18 22:53:31 -04:00
parent 2954aa88ea
commit 8ff32f4566
8 changed files with 69 additions and 10 deletions

View File

@@ -448,3 +448,29 @@ proc/get_nt_opposed()
else
message_admins("[M] ([M.key] has been converted into [role_type] with an active antagonist jobban for said role since no ghost has volunteered to take their place.")
to_chat(M, "<span class='biggerdanger'>You have been converted into [role_type] with an active jobban. Any further violations of the rules on your part are likely to result in a permanent ban.</span>")
/datum/game_mode/proc/printplayer(datum/mind/ply, fleecheck)
var/text = "<br><b>[ply.key]</b> was <b>[ply.name]</b> the <b>[ply.assigned_role]</b> and"
if(ply.current)
if(ply.current.stat == DEAD)
text += " <span class='boldannounce'>died</span>"
else
text += " <span class='greenannounce'>survived</span>"
if(fleecheck && ply.current.z > ZLEVEL_STATION)
text += " while <span class='boldannounce'>fleeing the station</span>"
if(ply.current.real_name != ply.name)
text += " as <b>[ply.current.real_name]</b>"
else
text += " <span class='boldannounce'>had their body destroyed</span>"
return text
/datum/game_mode/proc/printobjectives(datum/mind/ply)
var/text = ""
var/count = 1
for(var/datum/objective/objective in ply.objectives)
if(objective.check_completion())
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='greenannounce'>Success!</span>"
else
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='boldannounce'>Fail.</span>"
count++
return text

View File

@@ -286,11 +286,20 @@
return 1
/datum/game_mode/proc/auto_declare_completion_abduction()
var/text = ""
if(abductors.len)
to_chat(world, "Abductors:")
for(var/datum/mind/M in abductors)
to_chat(world, "<font size = 2><b>Abductor [M.current ? M.current.name : "Abductor"]([M.key])</b></font>")
return
text += "<br><span class='big'><b>The abductors were:</b></span>"
for(var/datum/mind/abductor_mind in abductors)
text += printplayer(abductor_mind)
text += printobjectives(abductor_mind)
text += "<br>"
if(abductees.len)
text += "<br><span class='big'><b>The abductees were:</b></span>"
for(var/datum/mind/abductee_mind in abductees)
text += printplayer(abductee_mind)
text += printobjectives(abductee_mind)
text += "<br>"
to_chat(world, text)
//Landmarks
// TODO: Split into seperate landmarks for prettier ships

View File

@@ -135,7 +135,7 @@
desc = "A dual-mode tool for retrieving specimens and scanning appearances. Scanning can be done through cameras."
icon = 'icons/obj/abductor.dmi'
icon_state = "gizmo_scan"
item_state = "silencer"
item_state = "gizmo"
origin_tech = "materials=5;magnets=5;bluespace=6;abductor=4"
var/mode = GIZMO_SCAN
var/mob/living/marked = null
@@ -216,7 +216,7 @@
desc = "A compact device used to shut down communications equipment."
icon = 'icons/obj/abductor.dmi'
icon_state = "silencer"
item_state = "gizmo"
item_state = "silencer"
origin_tech = "materials=5;magnets=5;abductor=3"
/obj/item/device/abductor/silencer/attack(mob/living/M, mob/user)

View File

@@ -20,12 +20,22 @@
jump_action.Grant(user)
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
if (get_dist(user, src) > 1 || user.eye_blind)
if(user == current_user)
off_action.Activate()
if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || user.eye_blind || user.incapacitated())
user.unset_machine()
return 0
return 1
/obj/machinery/computer/camera_advanced/Destroy()
if(current_user)
current_user.unset_machine()
if(eyeobj)
qdel(eyeobj)
return ..()
/obj/machinery/computer/camera_advanced/on_unset_machine(mob/M)
if(M == current_user)
off_action.Activate()
/obj/machinery/computer/camera_advanced/attack_hand(mob/user)
if(..())
return

View File

@@ -129,7 +129,13 @@
return
/mob/proc/unset_machine()
src.machine = null
if(machine)
machine.on_unset_machine(src)
machine = null
//called when the user unsets the machine.
/atom/movable/proc/on_unset_machine(mob/user)
return
/mob/proc/set_machine(var/obj/O)
if(src.machine)

View File

@@ -1,6 +1,8 @@
/datum/event/abductor
/datum/event/abductor/start()
//spawn abductor team
processing = 0 //so it won't fire again in next tick
if(!makeAbductorTeam())
message_admins("Abductor event failed to find players. Retrying in 30s.")
spawn(300)
@@ -44,6 +46,7 @@
if(ticker.mode.config_tag != "abduction")
ticker.mode.abductors |= temp.abductors
processing = 1 //So it will get gc'd
return 1
else
return 0

View File

@@ -48,6 +48,7 @@
return 0*/
/datum/event //NOTE: Times are measured in master controller ticks!
var/processing = 1
var/startWhen = 0 //When in the lifetime to call start().
var/announceWhen = 0 //When in the lifetime to call announce().
var/endWhen = 0 //When in the lifetime the event should end.
@@ -105,6 +106,9 @@
//Do not override this proc, instead use the appropiate procs.
//This proc will handle the calls to the appropiate procs.
/datum/event/proc/process()
if(!processing)
return
if(activeFor > startWhen && activeFor < endWhen || noAutoEnd)
tick()