mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Merge pull request #8549 from tedward1337/Ohgodthisishard
Adds Bluespace artillery button.
This commit is contained in:
@@ -83,7 +83,8 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/object_say,
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/forceEvent
|
||||
/client/proc/forceEvent,
|
||||
/client/proc/bluespace_artillery
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
|
||||
@@ -1469,40 +1469,8 @@
|
||||
H << "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>"
|
||||
|
||||
else if(href_list["BlueSpaceArtillery"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/living/M = locate(href_list["BlueSpaceArtillery"])
|
||||
if(!isliving(M))
|
||||
usr << "This can only be used on instances of type /mob/living"
|
||||
return
|
||||
|
||||
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
|
||||
return
|
||||
|
||||
if(BSACooldown)
|
||||
src.owner << "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!"
|
||||
return
|
||||
|
||||
BSACooldown = 1
|
||||
spawn(50)
|
||||
BSACooldown = 0
|
||||
|
||||
M << "You've been hit by bluespace artillery!"
|
||||
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]")
|
||||
message_admins("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]")
|
||||
|
||||
var/turf/simulated/floor/T = get_turf(M)
|
||||
if(istype(T))
|
||||
if(prob(80)) T.break_tile_to_plating()
|
||||
else T.break_tile()
|
||||
|
||||
if(M.health == 1)
|
||||
M.gib()
|
||||
else
|
||||
M.adjustBruteLoss( min( 99 , (M.health - 1) ) )
|
||||
M.Stun(20)
|
||||
M.Weaken(20)
|
||||
M.stuttering = 20
|
||||
M.client.bluespace_artillery(M)
|
||||
|
||||
else if(href_list["CentcommReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"])
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/client/proc/bluespace_artillery(var/mob/M in mob_list)
|
||||
set name = "Bluespace Artillery"
|
||||
set category = "Fun"
|
||||
|
||||
if(!holder || !check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/mob/living/target = M
|
||||
|
||||
if(!isliving(target))
|
||||
usr << "This can only be used on instances of type /mob/living"
|
||||
return
|
||||
|
||||
if(alert(usr, "Are you sure you wish to hit [key_name(target)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
|
||||
return
|
||||
|
||||
explosion(target.loc, 0, 0, 0, 0)
|
||||
|
||||
var/turf/simulated/floor/T = get_turf(target)
|
||||
if(istype(T))
|
||||
if(prob(80)) T.break_tile_to_plating()
|
||||
else T.break_tile()
|
||||
|
||||
if(target.health <= 1)
|
||||
target.gib()
|
||||
else
|
||||
target.adjustBruteLoss(min(99,(target.health - 1)))
|
||||
target.Stun(20)
|
||||
target.Weaken(20)
|
||||
target.stuttering = 20
|
||||
|
||||
target << "You've been hit by bluespace artillery!"
|
||||
log_admin("[target.name] has been hit by Bluespace Artillery fired by [usr]")
|
||||
message_admins("[target.name] has been hit by Bluespace Artillery fired by [usr]")
|
||||
Reference in New Issue
Block a user