Merge pull request #1045 from Citadel-Station-13/upstream-merge-27268

[MIRROR] World.dm Refactor
This commit is contained in:
LetterJay
2017-05-22 12:39:52 -05:00
committed by GitHub
23 changed files with 278 additions and 258 deletions
+11 -6
View File
@@ -419,13 +419,18 @@
set desc="Restarts the world immediately"
if (!usr.client.holder)
return
var/confirm = alert("Restart the game world?", "Restart", "Yes", "Cancel")
if(confirm == "Cancel")
return
if(confirm == "Yes")
SSticker.delay_end = 0
var/list/options = list("Regular Restart", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)")
var result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
if(result)
SSblackbox.add_details("admin_verb","Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
switch(result)
if("Regular Restart")
SSticker.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
if("Hard Restart (No Delay, No Feeback Reason)")
world.Reboot()
if("Hardest Restart (No actions, just reboot)")
world.Reboot(fast_track = TRUE)
/datum/admins/proc/end_round()
set category = "Server"
+1 -1
View File
@@ -1206,7 +1206,7 @@
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [GLOB.master_mode].</span>")
to_chat(world, "<span class='adminnotice'><b>The mode is now: [GLOB.master_mode]</b></span>")
Game() // updates the main game menu
world.save_mode(GLOB.master_mode)
SSticker.save_mode(GLOB.master_mode)
.(href, list("c_mode"=1))
else if(href_list["f_secret2"])
+1 -4
View File
@@ -52,10 +52,7 @@
if(!check_rights(R_SOUNDS))
return
if(SSticker)
SSticker.round_end_sound = fcopy_rsc(S)
else
return
SSticker.SetRoundEndSound(S)
log_admin("[key_name(src)] set the round end sound to [S]")
message_admins("[key_name_admin(src)] set the round end sound to [S]")
+4
View File
@@ -672,3 +672,7 @@ GLOBAL_LIST(external_rsc_urls)
CRASH("change_view called without argument.")
view = new_size
/client/proc/AnnouncePR(announcement)
if(prefs && prefs.chat_toggles & CHAT_PULLR)
to_chat(src, announcement)
@@ -5,7 +5,7 @@
item_state = null
w_class = WEIGHT_CLASS_BULKY
force = 10
modifystate = TRUE
modifystate = TRUE
flags = CONDUCT
slot_flags = SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
@@ -40,7 +40,7 @@
w_class = WEIGHT_CLASS_NORMAL
slot_flags = SLOT_BELT
icon_state = "pulse_carbine"
item_state = null
item_state = null
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/carbine"
can_flashlight = 1
flight_x_offset = 18
+27 -27
View File
@@ -190,7 +190,7 @@
name = "dart"
icon_state = "cbbolt"
damage = 6
var/piercing = FALSE
var/piercing = FALSE
/obj/item/projectile/bullet/dart/New()
..()
@@ -201,15 +201,15 @@
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100) // not completely blocked
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..()
reagents.reaction(M, INJECT)
reagents.trans_to(M, reagents.total_volume)
return TRUE
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
..(target, blocked)
reagents.set_reacting(TRUE)
@@ -240,28 +240,28 @@
nodamage = 1
. = ..() // Execute the rest of the code.
/obj/item/projectile/bullet/dnainjector
name = "\improper DNA injector"
icon_state = "syringeproj"
var/obj/item/weapon/dnainjector/injector
/obj/item/projectile/bullet/dnainjector/on_hit(atom/target, blocked = 0)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100)
if(M.can_inject(null, FALSE, def_zone, FALSE))
if(injector.inject(M, firer))
QDEL_NULL(injector)
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
return ..()
/obj/item/projectile/bullet/dnainjector/Destroy()
QDEL_NULL(injector)
return ..()
/obj/item/projectile/bullet/dnainjector
name = "\improper DNA injector"
icon_state = "syringeproj"
var/obj/item/weapon/dnainjector/injector
/obj/item/projectile/bullet/dnainjector/on_hit(atom/target, blocked = 0)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100)
if(M.can_inject(null, FALSE, def_zone, FALSE))
if(injector.inject(M, firer))
QDEL_NULL(injector)
return TRUE
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You were protected against \the [src]!</span>")
return ..()
/obj/item/projectile/bullet/dnainjector/Destroy()
QDEL_NULL(injector)
return ..()
//// SNIPER BULLETS