Uplink Items - Part III

Phase III of the antag uplink additions.
Currently contains proof-of-concept falsified announcements.
This commit is contained in:
PsiOmegaDelta
2015-07-03 16:02:02 +02:00
parent 41d86361a0
commit 8c51676722
12 changed files with 169 additions and 43 deletions

View File

@@ -117,3 +117,9 @@ datum/announcement/proc/Log(message as text, message_title as text)
/proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I) /proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I)
// Format currently matches that of newscaster feeds: Registered Name (Assigned Rank) // Format currently matches that of newscaster feeds: Registered Name (Assigned Rank)
return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name
/proc/level_seven_announcement()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/proc/ion_storm_announcement()
command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")

View File

@@ -36,5 +36,8 @@
/datum/uplink_category/hardsuit_modules /datum/uplink_category/hardsuit_modules
name = "Hardsuit Modules" name = "Hardsuit Modules"
/datum/uplink_category/announcements
name = "Announcements"
/datum/uplink_category/badassery /datum/uplink_category/badassery
name = "Badassery" name = "Badassery"

View File

@@ -38,15 +38,31 @@ var/datum/uplink/uplink = new()
..() ..()
antag_roles = list() antag_roles = list()
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
purchase_log(U)
var/cost = cost(U.uses)
var/goods = get_goods(U, get_turf(user))
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
var/extra_args = extra_args(user)
if(!extra_args)
return
if(!can_buy(U))
return
var/cost = cost(U.uses)
var/goods = get_goods(U, get_turf(user), user, extra_args)
if(!goods)
return
purchase_log(U)
U.uses -= cost U.uses -= cost
U.used_TC += cost U.used_TC += cost
return goods return goods
// Any additional arguments you wish to send to the get_goods
/datum/uplink_item/proc/extra_args(var/mob/user)
return 1
/datum/uplink_item/proc/can_buy(obj/item/device/uplink/U) /datum/uplink_item/proc/can_buy(obj/item/device/uplink/U)
if(cost(U.uses) > U.uses) if(cost(U.uses) > U.uses)
return 0 return 0
@@ -90,11 +106,14 @@ datum/uplink_item/dd_SortValue()
/******************************** /********************************
* * * *
* Physical Uplink Entires * * Physical Uplink Entries *
* * * *
********************************/ ********************************/
/datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user) /datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user)
var/obj/item/I = ..() var/obj/item/I = ..()
if(!I)
return
if(istype(I, /list)) if(istype(I, /list))
var/list/L = I var/list/L = I
if(L.len) I = L[1] if(L.len) I = L[1]
@@ -512,6 +531,104 @@ datum/uplink_item/dd_SortValue()
return "\icon[icon]" return "\icon[icon]"
/********************************
* *
* Abstract Uplink Entries *
* *
********************************/
var/image/default_abstract_uplink_icon
/datum/uplink_item/abstract/log_icon()
if(!default_abstract_uplink_icon)
default_abstract_uplink_icon = image('icons/obj/pda.dmi', "pda-syn")
return "\icon[default_abstract_uplink_icon]"
/****************
* Announcements *
*****************/
/datum/uplink_item/abstract/announcements
category = /datum/uplink_category/announcements
/datum/uplink_item/abstract/announcements/buy(var/obj/item/device/uplink/U, var/mob/user)
. = ..()
if(.)
log_and_message_admins("has triggered a falsified [src] announcement", user)
/datum/uplink_item/abstract/announcements/fake_centcom
item_cost = DEFAULT_TELECRYSTAL_AMOUNT / 2
/datum/uplink_item/abstract/announcements/fake_centcom/New()
..()
name = "[command_name()] Update"
desc = "Causes a falsified [command_name()] Update. Triggers immediately after supplying additional data."
antag_roles = list(MODE_MERCENARY)
/datum/uplink_item/abstract/announcements/fake_centcom/extra_args(var/mob/user)
if(!user)
return 0
var/subtitle = input(user, "Enter the annoncement Title.", "Annoncement Title", "Attention") as text|null
if(!subtitle)
return 0
var/message = input(user, "Enter the annoncement message.", "Annoncement Message") as text|null
if(!message)
return 0
return list("title" = subtitle, "message" = message)
/datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
command_announcement.Announce(args.["message"], args.["title"])
return 1
/datum/uplink_item/abstract/announcements/fake_cryo
name = "Cryogenic Oversight Announcement"
desc = "Causes a falsified cryogenic message. Triggers immediately after supplying additional data."
item_cost = 1
/datum/uplink_item/abstract/announcements/fake_cryo/extra_args(var/mob/user)
if(!user)
return 0
var/real_name = input(user, "Enter the name of the occupant.", "Occupant Name.", user.name) as text|null
if(!real_name)
return 0
var/title = input(user, "Enter the title of the occupant.", "Occupant Title.", "Assistant") as text|null
if(!title)
return 0
return list("name" = real_name, "title" = title)
/datum/uplink_item/abstract/announcements/fake_cryo/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
if(!args)
return 0
var/obj/item/device/radio/intercom/announce = new /obj/item/device/radio/intercom(user)
announce.autosay("[args["name"]], [args["title"]], has entered long-term storage.", "Cryogenic Oversight")
qdel(announce)
return 1
/datum/uplink_item/abstract/announcements/fake_ion_storm
name = "Ion Storm Announcement"
desc = "Interferes with the station's ion sensors. Triggers immediately upon investment."
item_cost = 1
/datum/uplink_item/abstract/announcements/fake_ion_storm/get_goods(var/obj/item/device/uplink/U, var/loc)
ion_storm_announcement()
return 1
/datum/uplink_item/abstract/announcements/fake_radiation
name = "Radiation Storm Announcement"
desc = "Interferes with the station's radiation sensors. Triggers immediately upon investment."
item_cost = 3
/datum/uplink_item/abstract/announcements/fake_radiation/get_goods(var/obj/item/device/uplink/U, var/loc)
var/datum/event_meta/EM = new(EVENT_LEVEL_MUNDANE, "Fake Radiation Storm", add_to_queue = 0)
new/datum/event/radiation_storm/syndicate(EM)
return 1
/**************** /****************
* Support procs * * Support procs *
****************/ ****************/

View File

@@ -4,7 +4,7 @@
proc/log_and_message_admins(var/message as text, var/mob/user = usr) proc/log_and_message_admins(var/message as text, var/mob/user = usr)
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]") log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
message_admins(user ? "[key_name(user)] [message]" : "EVENT [message]") message_admins(user ? "[key_name_admin(user)] [message]" : "EVENT [message]")
proc/log_and_message_admins_many(var/list/mob/users, var/message) proc/log_and_message_admins_many(var/list/mob/users, var/message)
if(!users || !users.len) if(!users || !users.len)
@@ -17,10 +17,6 @@ proc/log_and_message_admins_many(var/list/mob/users, var/message)
log_admin("[english_list(user_keys)] [message]") log_admin("[english_list(user_keys)] [message]")
message_admins("[english_list(user_keys)] [message]") message_admins("[english_list(user_keys)] [message]")
proc/admin_log_and_message_admins(var/message as text)
log_admin(usr ? "[key_name_admin(usr)] [message]" : "EVENT [message]")
message_admins(usr ? "[key_name_admin(usr)] [message]" : "EVENT [message]", 1)
proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message) proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
if(victim) if(victim)
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[key_name(attacker)] - [victim_message]</font>") victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[key_name(attacker)] - [victim_message]</font>")

View File

@@ -726,7 +726,7 @@ var/list/admin_verbs_mentor = list(
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name)) var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
if(new_name && new_name != S.real_name) if(new_name && new_name != S.real_name)
admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'") log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
S.SetName(new_name) S.SetName(new_name)
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -741,7 +741,7 @@ var/list/admin_verbs_mentor = list(
var/datum/nano_module/law_manager/L = new(S) var/datum/nano_module/law_manager/L = new(S)
L.ui_interact(usr, state = admin_state) L.ui_interact(usr, state = admin_state)
admin_log_and_message_admins("has opened [S]'s law manager.") log_and_message_admins("has opened [S]'s law manager.")
feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/change_human_appearance_admin() /client/proc/change_human_appearance_admin()
@@ -754,7 +754,7 @@ var/list/admin_verbs_mentor = list(
var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Admin") as null|anything in human_mob_list var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Admin") as null|anything in human_mob_list
if(!H) return if(!H) return
admin_log_and_message_admins("is altering the appearance of [H].") log_and_message_admins("is altering the appearance of [H].")
H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0, state = admin_state) H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0, state = admin_state)
feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -774,10 +774,10 @@ var/list/admin_verbs_mentor = list(
switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
if("Yes") if("Yes")
admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.") log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.")
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0) H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0)
if("No") if("No")
admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.") log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.")
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1) H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1)
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -4,7 +4,7 @@
set category = "Fun" set category = "Fun"
var/turf/target = get_turf(src.mob) var/turf/target = get_turf(src.mob)
admin_log_and_message_admins("has fired the Icarus point defense laser at [target.x]-[target.y]-[target.z]") log_and_message_admins("has fired the Icarus point defense laser at [target.x]-[target.y]-[target.z]")
if(!src.holder) if(!src.holder)
src << "Only administrators may use this command." src << "Only administrators may use this command."
return return
@@ -18,7 +18,7 @@
set category = "Fun" set category = "Fun"
var/turf/target = get_turf(src.mob) var/turf/target = get_turf(src.mob)
admin_log_and_message_admins("has fired the Icarus main gun projectile at [target.x]-[target.y]-[target.z]") log_and_message_admins("has fired the Icarus main gun projectile at [target.x]-[target.y]-[target.z]")
if(!src.holder) if(!src.holder)
src << "Only administrators may use this command." src << "Only administrators may use this command."
return return
@@ -31,7 +31,7 @@
set desc = "Lets you chose the position of the Icarus in regards to the map." set desc = "Lets you chose the position of the Icarus in regards to the map."
set category = "Fun" set category = "Fun"
admin_log_and_message_admins("is changing the Icarus position.") log_and_message_admins("is changing the Icarus position.")
if(!src.holder) if(!src.holder)
src << "Only administrators may use this command." src << "Only administrators may use this command."
return return

View File

@@ -4,10 +4,8 @@
var/obj/effect/blob/core/Blob var/obj/effect/blob/core/Blob
/datum/event/blob/announce() /datum/event/blob/announce()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') level_seven_announcement()
/datum/event/blob/start() /datum/event/blob/start()
var/turf/T = pick(blobstart) var/turf/T = pick(blobstart)
@@ -18,10 +16,9 @@
for(var/i = 1; i < rand(3, 4), i++) for(var/i = 1; i < rand(3, 4), i++)
Blob.process() Blob.process()
/datum/event/blob/tick() /datum/event/blob/tick()
if(!Blob) if(!Blob)
kill() kill()
return return
if(IsMultiple(activeFor, 3)) if(IsMultiple(activeFor, 3))
Blob.process() Blob.process()

View File

@@ -5,11 +5,12 @@
var/min_weight = 0 // The minimum weight that this event will have. Only used if non-zero. var/min_weight = 0 // The minimum weight that this event will have. Only used if non-zero.
var/max_weight = 0 // The maximum weight that this event will have. Only use if non-zero. var/max_weight = 0 // The maximum weight that this event will have. Only use if non-zero.
var/severity = 0 // The current severity of this event var/severity = 0 // The current severity of this event
var/one_shot = 0 //If true, then the event will not be re-added to the list of available events var/one_shot = 0 // If true, then the event will not be re-added to the list of available events
var/add_to_queue= 1 // If true, add back to the queue of events upon finishing.
var/list/role_weights = list() var/list/role_weights = list()
var/datum/event/event_type var/datum/event/event_type
/datum/event_meta/New(var/event_severity, var/event_name, var/datum/event/type, var/event_weight, var/list/job_weights, var/is_one_shot = 0, var/min_event_weight = 0, var/max_event_weight = 0) /datum/event_meta/New(var/event_severity, var/event_name, var/datum/event/type, var/event_weight, var/list/job_weights, var/is_one_shot = 0, var/min_event_weight = 0, var/max_event_weight = 0, var/add_to_queue = 1)
name = event_name name = event_name
severity = event_severity severity = event_severity
event_type = type event_type = type
@@ -17,6 +18,7 @@
weight = event_weight weight = event_weight
min_weight = min_event_weight min_weight = min_event_weight
max_weight = max_event_weight max_weight = max_event_weight
src.add_to_queue = add_to_queue
if(job_weights) if(job_weights)
role_weights = job_weights role_weights = job_weights

View File

@@ -41,7 +41,8 @@
// Add the event back to the list of available events // Add the event back to the list of available events
var/datum/event_container/EC = event_containers[E.severity] var/datum/event_container/EC = event_containers[E.severity]
var/datum/event_meta/EM = E.event_meta var/datum/event_meta/EM = E.event_meta
EC.available_events += EM if(EM.add_to_queue)
EC.available_events += EM
log_debug("Event '[EM.name]' has completed at [worldtime2text()].") log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
@@ -193,41 +194,41 @@
if(href_list["toggle_report"]) if(href_list["toggle_report"])
report_at_round_end = !report_at_round_end report_at_round_end = !report_at_round_end
admin_log_and_message_admins("has [report_at_round_end ? "enabled" : "disabled"] the round end event report.") log_and_message_admins("has [report_at_round_end ? "enabled" : "disabled"] the round end event report.")
else if(href_list["dec_timer"]) else if(href_list["dec_timer"])
var/datum/event_container/EC = locate(href_list["event"]) var/datum/event_container/EC = locate(href_list["event"])
var/decrease = 60 * (10 ** text2num(href_list["dec_timer"])) var/decrease = 60 * (10 ** text2num(href_list["dec_timer"]))
EC.next_event_time -= decrease EC.next_event_time -= decrease
admin_log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).") log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).")
else if(href_list["inc_timer"]) else if(href_list["inc_timer"])
var/datum/event_container/EC = locate(href_list["event"]) var/datum/event_container/EC = locate(href_list["event"])
var/increase = 60 * (10 ** text2num(href_list["inc_timer"])) var/increase = 60 * (10 ** text2num(href_list["inc_timer"]))
EC.next_event_time += increase EC.next_event_time += increase
admin_log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).") log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).")
else if(href_list["select_event"]) else if(href_list["select_event"])
var/datum/event_container/EC = locate(href_list["select_event"]) var/datum/event_container/EC = locate(href_list["select_event"])
var/datum/event_meta/EM = EC.SelectEvent() var/datum/event_meta/EM = EC.SelectEvent()
if(EM) if(EM)
admin_log_and_message_admins("has queued the [severity_to_string[EC.severity]] event '[EM.name]'.") log_and_message_admins("has queued the [severity_to_string[EC.severity]] event '[EM.name]'.")
else if(href_list["pause"]) else if(href_list["pause"])
var/datum/event_container/EC = locate(href_list["pause"]) var/datum/event_container/EC = locate(href_list["pause"])
EC.delayed = !EC.delayed EC.delayed = !EC.delayed
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.") log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
else if(href_list["pause_all"]) else if(href_list["pause_all"])
config.allow_random_events = text2num(href_list["pause_all"]) config.allow_random_events = text2num(href_list["pause_all"])
admin_log_and_message_admins("has [config.allow_random_events ? "resumed" : "paused"] countdown for all events.") log_and_message_admins("has [config.allow_random_events ? "resumed" : "paused"] countdown for all events.")
else if(href_list["interval"]) else if(href_list["interval"])
var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
if(delay && delay > 0) if(delay && delay > 0)
var/datum/event_container/EC = locate(href_list["interval"]) var/datum/event_container/EC = locate(href_list["interval"])
EC.delay_modifier = delay EC.delay_modifier = delay
admin_log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].") log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].")
else if(href_list["stop"]) else if(href_list["stop"])
if(alert("Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes") if(alert("Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes")
return return
var/datum/event/E = locate(href_list["stop"]) var/datum/event/E = locate(href_list["stop"])
var/datum/event_meta/EM = E.event_meta var/datum/event_meta/EM = E.event_meta
admin_log_and_message_admins("has stopped the [severity_to_string[EM.severity]] event '[EM.name]'.") log_and_message_admins("has stopped the [severity_to_string[EM.severity]] event '[EM.name]'.")
E.kill() E.kill()
else if(href_list["view_events"]) else if(href_list["view_events"])
selected_event_container = locate(href_list["view_events"]) selected_event_container = locate(href_list["view_events"])
@@ -249,23 +250,23 @@
var/datum/event_meta/EM = locate(href_list["set_weight"]) var/datum/event_meta/EM = locate(href_list["set_weight"])
EM.weight = weight EM.weight = weight
if(EM != new_event) if(EM != new_event)
admin_log_and_message_admins("has changed the weight of the [severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].") log_and_message_admins("has changed the weight of the [severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].")
else if(href_list["toggle_oneshot"]) else if(href_list["toggle_oneshot"])
var/datum/event_meta/EM = locate(href_list["toggle_oneshot"]) var/datum/event_meta/EM = locate(href_list["toggle_oneshot"])
EM.one_shot = !EM.one_shot EM.one_shot = !EM.one_shot
if(EM != new_event) if(EM != new_event)
admin_log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [severity_to_string[EM.severity]] event '[EM.name]'.") log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [severity_to_string[EM.severity]] event '[EM.name]'.")
else if(href_list["toggle_enabled"]) else if(href_list["toggle_enabled"])
var/datum/event_meta/EM = locate(href_list["toggle_enabled"]) var/datum/event_meta/EM = locate(href_list["toggle_enabled"])
EM.enabled = !EM.enabled EM.enabled = !EM.enabled
admin_log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.") log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.")
else if(href_list["remove"]) else if(href_list["remove"])
if(alert("This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes") if(alert("This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes")
return return
var/datum/event_meta/EM = locate(href_list["remove"]) var/datum/event_meta/EM = locate(href_list["remove"])
var/datum/event_container/EC = locate(href_list["EC"]) var/datum/event_container/EC = locate(href_list["EC"])
EC.available_events -= EM EC.available_events -= EM
admin_log_and_message_admins("has removed the [severity_to_string[EM.severity]] event '[EM.name]'.") log_and_message_admins("has removed the [severity_to_string[EM.severity]] event '[EM.name]'.")
else if(href_list["add"]) else if(href_list["add"])
if(!new_event.name || !new_event.event_type) if(!new_event.name || !new_event.event_type)
return return
@@ -273,12 +274,12 @@
return return
new_event.severity = selected_event_container.severity new_event.severity = selected_event_container.severity
selected_event_container.available_events += new_event selected_event_container.available_events += new_event
admin_log_and_message_admins("has added \a [severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].") log_and_message_admins("has added \a [severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].")
new_event = new new_event = new
else if(href_list["clear"]) else if(href_list["clear"])
var/datum/event_container/EC = locate(href_list["clear"]) var/datum/event_container/EC = locate(href_list["clear"])
if(EC.next_event) if(EC.next_event)
admin_log_and_message_admins("has dequeued the [severity_to_string[EC.severity]] event '[EC.next_event.name]'.") log_and_message_admins("has dequeued the [severity_to_string[EC.severity]] event '[EC.next_event.name]'.")
EC.next_event = null EC.next_event = null
Interact(usr) Interact(usr)

View File

@@ -95,7 +95,7 @@
/datum/event/ionstorm/end() /datum/event/ionstorm/end()
spawn(rand(5000,8000)) spawn(rand(5000,8000))
if(prob(50)) if(prob(50))
command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") ion_storm_announcement()
/* /*
/proc/IonStorm(botEmagChance = 10) /proc/IonStorm(botEmagChance = 10)

View File

@@ -3,6 +3,7 @@
var/const/radIntervall = 5 // Enough time between enter/leave belt for 10 hits, as per original implementation var/const/radIntervall = 5 // Enough time between enter/leave belt for 10 hits, as per original implementation
var/const/leaveBelt = 80 var/const/leaveBelt = 80
var/const/revokeAccess = 135 var/const/revokeAccess = 135
startWhen = 2
announceWhen = 1 announceWhen = 1
endWhen = revokeAccess endWhen = revokeAccess
var/postStartTicks = 0 var/postStartTicks = 0
@@ -52,3 +53,6 @@
/datum/event/radiation_storm/end() /datum/event/radiation_storm/end()
revoke_maint_all_access() revoke_maint_all_access()
/datum/event/radiation_storm/syndicate/radiate()
return

View File

@@ -1,11 +1,11 @@
/var/global/spacevines_spawned = 0 /var/global/spacevines_spawned = 0
/datum/event/spacevine /datum/event/spacevine
announceWhen = 10 announceWhen = 60
/datum/event/spacevine/start() /datum/event/spacevine/start()
spacevine_infestation() spacevine_infestation()
spacevines_spawned = 1 spacevines_spawned = 1
/datum/event/spacevine/announce() /datum/event/spacevine/announce()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') level_seven_announcement()