Refactors explosions

This commit is contained in:
CitadelStationBot
2017-05-24 16:45:00 -05:00
parent 869953cd18
commit 11344c4682
41 changed files with 932 additions and 139 deletions
+24
View File
@@ -0,0 +1,24 @@
diff a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm (rejected hunks)
@@ -515,11 +515,11 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
var/flash_range = input("Flash range (in tiles):") as null|num
if(flash_range == null)
return
- if(devastation_range > SSexplosion.devastation_cap || heavy_impact_range > SSexplosion.heavy_cap || light_impact_range > SSexplosion.light_cap || flash_range > SSexplosion.flash_cap)
+ if(devastation_range > GLOB.MAX_EX_DEVESTATION_RANGE || heavy_impact_range > GLOB.MAX_EX_HEAVY_RANGE || light_impact_range > GLOB.MAX_EX_LIGHT_RANGE || flash_range > GLOB.MAX_EX_FLASH_RANGE)
if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
return
epicenter = mob.loc //We need to reupdate as they may have moved again
- SSexplosion.Create(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE)
+ explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE)
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
feedback_add_details("admin_verb","Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -532,7 +532,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
var/ex_power = input("Explosive Power:") as null|num
var/turf/epicenter = mob.loc
if(ex_power && epicenter)
- SSexplosion.CreateDynamic(epicenter, ex_power)
+ dyn_explosion(epicenter, ex_power)
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
feedback_add_details("admin_verb","Drop Dynamic Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+29
View File
@@ -0,0 +1,29 @@
diff a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm (rejected hunks)
@@ -386,19 +386,19 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")
- var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", SSexplosion.light_cap) as num|null
+ var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null
if (newBombCap < 4)
return
- SSexplosion.devastation_cap = round(newBombCap/4)
- SSexplosion.heavy_cap = round(newBombCap/2)
- SSexplosion.light_cap = newBombCap
+ GLOB.MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
+ GLOB.MAX_EX_HEAVY_RANGE = round(newBombCap/2)
+ GLOB.MAX_EX_LIGHT_RANGE = newBombCap
//I don't know why these are their own variables, but fuck it, they are.
- SSexplosion.flash_cap = newBombCap
- SSexplosion.flame_cap = newBombCap
+ GLOB.MAX_EX_FLASH_RANGE = newBombCap
+ GLOB.MAX_EX_FLAME_RANGE = newBombCap
- message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [SSexplosion.devastation_cap], [SSexplosion.heavy_cap], [SSexplosion.light_cap]</span>")
- log_admin("[key_name(usr)] changed the bomb cap to [SSexplosion.devastation_cap], [SSexplosion.heavy_cap], [SSexplosion.light_cap]")
+ message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]</span>")
+ log_admin("[key_name(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]")
if("lightsout")
@@ -0,0 +1,10 @@
diff a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm (rejected hunks)
@@ -557,7 +557,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
return
- SSexplosion.Create(O, devastation, heavy, light, flash, null, null,flames)
+ explosion(O, devastation, heavy, light, flash, null, null,flames)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
feedback_add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!