mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-05 15:03:48 +00:00
Re-implements world end events as datums.
This commit is contained in:
@@ -44,6 +44,9 @@ var/datum/admin_secrets/admin_secrets = new()
|
||||
var/feedback = 1
|
||||
var/permissions = R_HOST
|
||||
|
||||
/datum/admin_secret_item/dd_SortValue()
|
||||
return "[name]"
|
||||
|
||||
/datum/admin_secret_item/proc/name()
|
||||
return name
|
||||
|
||||
@@ -75,6 +78,7 @@ var/datum/admin_secrets/admin_secrets = new()
|
||||
|
||||
/datum/admin_secret_category/final_solutions
|
||||
name = "Final Solutions"
|
||||
desc = "(Warning, these will end the round!)"
|
||||
|
||||
/*************************
|
||||
* Pre-defined base items *
|
||||
|
||||
13
code/modules/admin/secrets/admin_secrets/admin_logs.dm
Normal file
13
code/modules/admin/secrets/admin_secrets/admin_logs.dm
Normal file
@@ -0,0 +1,13 @@
|
||||
/datum/admin_secret_item/admin_secret/admin_logs
|
||||
name = "Admin Logs"
|
||||
|
||||
/datum/admin_secret_item/admin_secret/admin_logs/execute(var/mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/dat = "<B>Admin Log<HR></B>"
|
||||
for(var/l in admin_log)
|
||||
dat += "<li>[l]</li>"
|
||||
if(!admin_log.len)
|
||||
dat += "No-one has done anything this round!"
|
||||
user << browse(dat, "window=admin_log")
|
||||
@@ -9,28 +9,28 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
if (!shuttle_tag) return
|
||||
|
||||
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
|
||||
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!origin_area) return
|
||||
|
||||
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!destination_area) return
|
||||
|
||||
var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No")
|
||||
var/long_jump = alert(user, "Is there a transition area for this jump?","", "Yes", "No")
|
||||
if (long_jump == "Yes")
|
||||
var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
var/transition_area = input(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!transition_area) return
|
||||
|
||||
var/move_duration = input("How many seconds will this jump take?") as num
|
||||
var/move_duration = input(user, "How many seconds will this jump take?") as num
|
||||
|
||||
S.long_jump(origin_area, destination_area, transition_area, move_duration)
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle</span>", 1)
|
||||
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
|
||||
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle</span>", 1)
|
||||
log_admin("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
|
||||
else
|
||||
S.short_jump(origin_area, destination_area)
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle</span>", 1)
|
||||
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
|
||||
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle</span>", 1)
|
||||
log_admin("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
|
||||
valid_shuttles += shuttle_tag
|
||||
|
||||
var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to launch?") as null|anything in valid_shuttles
|
||||
if (!shuttle_tag)
|
||||
return
|
||||
|
||||
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
if (S.can_launch())
|
||||
S.launch(usr)
|
||||
S.launch(user)
|
||||
log_and_message_admins("launched the [shuttle_tag] shuttle", user)
|
||||
else
|
||||
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
|
||||
alert(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
|
||||
@@ -14,13 +14,13 @@
|
||||
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
|
||||
valid_shuttles += shuttle_tag
|
||||
|
||||
var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
|
||||
var/shuttle_tag = input(user, "Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
|
||||
if (!shuttle_tag)
|
||||
return
|
||||
|
||||
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
if (S.can_force())
|
||||
S.force_launch(usr)
|
||||
S.force_launch(user)
|
||||
log_and_message_admins("forced the [shuttle_tag] shuttle", user)
|
||||
else
|
||||
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
|
||||
alert(user, "The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
else if(!H.dna)
|
||||
dat += "<tr><td>[H]</td><td>H.dna = null</td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=fingerprints;size=440x410")
|
||||
user << browse(dat, "window=fingerprints;size=440x410")
|
||||
|
||||
@@ -9,20 +9,20 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
|
||||
var/confirm = alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
|
||||
if (confirm == "Cancel")
|
||||
return
|
||||
|
||||
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
if (!shuttle_tag) return
|
||||
|
||||
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
|
||||
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!origin_area) return
|
||||
|
||||
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!destination_area) return
|
||||
|
||||
S.move(origin_area, destination_area)
|
||||
log_and_message_admins("[key_name_admin(usr)] moved the [shuttle_tag] shuttle", user)
|
||||
log_and_message_admins("moved the [shuttle_tag] shuttle", user)
|
||||
|
||||
11
code/modules/admin/secrets/final_solutions/summon_narsie.dm
Normal file
11
code/modules/admin/secrets/final_solutions/summon_narsie.dm
Normal file
@@ -0,0 +1,11 @@
|
||||
/datum/admin_secret_item/final_solution/summon_narsie
|
||||
name = "Summon Nar-Sie"
|
||||
|
||||
/datum/admin_secret_item/final_solution/summon_narsie/execute(var/mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/choice = input(user, "You sure you want to end the round and summon Nar-Sie at your location? Misuse of this could result in removal of flags or hilarity.") in list("PRAISE SATAN", "Cancel")
|
||||
if(choice == "PRAISE SATAN")
|
||||
new /obj/singularity/narsie/large(get_turf(user))
|
||||
log_and_message_admins("has summoned Nar-Sie and brought about a new realm of suffering.", user)
|
||||
@@ -0,0 +1,13 @@
|
||||
/datum/admin_secret_item/final_solution/supermatter_cascade
|
||||
name = "Supermatter Cascade"
|
||||
|
||||
/datum/admin_secret_item/final_solution/supermatter_cascade/execute(var/mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/choice = input(user, "You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.") in list("NO TIME TO EXPLAIN", "Cancel")
|
||||
if(choice == "NO TIME TO EXPLAIN")
|
||||
explosion(get_turf(user), 8, 16, 24, 32, 1)
|
||||
new /turf/unsimulated/wall/supermatter(get_turf(user))
|
||||
SetUniversalState(/datum/universal_state/supermatter_cascade)
|
||||
message_admins("[key_name_admin(user)] has managed to destroy the universe with a supermatter cascade. Good job, [key_name_admin(user)]")
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/admin_secret_item/fun_secret/break_all_lights
|
||||
name = "Break All Lights"
|
||||
|
||||
/datum/admin_secret_item/fun_secret/make_all_areas_powered/execute(var/mob/user)
|
||||
/datum/admin_secret_item/fun_secret/break_all_lights/execute(var/mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
lightsout(0,0)
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
var/range_dev = max_explosion_range *0.25
|
||||
var/range_high = max_explosion_range *0.5
|
||||
var/range_low = max_explosion_range
|
||||
message_admins("<span class='danger'>[key_name_admin(usr)] changed the bomb cap to [range_dev], [range_high], [range_low]</span>", 1)
|
||||
log_admin("[key_name_admin(usr)] changed the bomb cap to [max_explosion_range]")
|
||||
message_admins("<span class='danger'>[key_name_admin(user)] changed the bomb cap to [range_dev], [range_high], [range_low]</span>", 1)
|
||||
log_admin("[key_name_admin(user)] changed the bomb cap to [max_explosion_range]")
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","Grav")
|
||||
if(gravity_is_on)
|
||||
log_admin("[key_name(usr)] toggled gravity on.", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] toggled gravity on.", 1)
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.")
|
||||
log_admin("[key_name(user)] toggled gravity on.", 1)
|
||||
message_admins("<span class='notice'>[key_name_admin(user)] toggled gravity on.", 1)
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.</span>")
|
||||
else
|
||||
log_admin("[key_name(usr)] toggled gravity off.", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] toggled gravity off.", 1)
|
||||
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.")
|
||||
log_admin("[key_name(user)] toggled gravity off.", 1)
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] toggled gravity off.", 1)
|
||||
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.</span>")
|
||||
|
||||
Reference in New Issue
Block a user