mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Adds two admin weapons and refactors wall damage code.
The Icarus is now fireable in gun form. The point defense mode fires several lasers one after the other so that it can penetrate. The main gun mode fires a modified meteor. Also added an "abstract weapon" which has the projectile type settable for admin shenanigans. Walls now lack an armor variable, which is replaced with buffed health. Normal walls take 4 shots with a normal laser or 5 emitter bursts to destroy. Reinforced walls now take 20 normal laser shots or 28 emitter shots. Added some proactive runtime protection to logging for projectile impacts. Without a valid firer, the jump button is linked to the victim.
This commit is contained in:
@@ -233,3 +233,60 @@ obj/item/weapon/gun/energy/staff/focus
|
||||
set popup_menu = 1
|
||||
|
||||
zoom()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/icarus
|
||||
name = "\improper N.D.V. Icarus"
|
||||
desc = "It feels like the fate of the Exodus in your hands. SO STOP FUCKING IT UP. It's set to fire point defense lasers.."
|
||||
projectile_type = "/obj/item/projectile/icarus/pointdefense"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "rubberducky"
|
||||
item_state = "rubberducky"
|
||||
charge_cost = 0
|
||||
silenced = 1
|
||||
var/popgun = 1
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
if(popgun)
|
||||
popgun = 0
|
||||
desc = "It feels like the fate of the Exodus in your hands. SO STOP FUCKING IT UP. It's set to fire the main guns."
|
||||
projectile_type = "/obj/item/projectile/icarus/guns"
|
||||
user << "You switch to using the main guns."
|
||||
|
||||
else
|
||||
popgun = 1
|
||||
desc = "It feels like the fate of the Exodus in your hands. SO STOP FUCKING IT UP. It's set to fire point defense lasers.."
|
||||
projectile_type = "/obj/item/projectile/icarus/pointdefense"
|
||||
user << "You switch to using the point-defense lasers."
|
||||
. = ..()
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
verb/fuckshitup()
|
||||
set name = "fuckshitup"
|
||||
set desc = "This will kill a lot of people."
|
||||
set hidden = 1
|
||||
|
||||
popgun = 0
|
||||
desc = "It feels like the fate of the Exodus is in your han- wait, what the hell ARE YOU DOING!?"
|
||||
projectile_type = "/obj/item/projectile/icarus/torpedo"
|
||||
usr << "You tell the crew to load the highly illegal phasic torpedos. After the mutiny has been put down, you are ready to burn the world."
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/variable
|
||||
name = "abstract weapon"
|
||||
desc = "It seems to shift and flow as you watch."
|
||||
charge_cost = 0
|
||||
silenced = 1
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
var/type = input(user,"What projectile type?","Projectile", null) as null|anything in typesof(/obj/item/projectile)
|
||||
if(!type)
|
||||
return ..()
|
||||
|
||||
projectile_type = "[type]"
|
||||
. = ..()
|
||||
|
||||
@@ -137,3 +137,69 @@
|
||||
var/mob/living/carbon/human/M = target
|
||||
M.adjustBrainLoss(20)
|
||||
M.hallucination += 20
|
||||
|
||||
/obj/item/projectile/icarus/pointdefense
|
||||
process()
|
||||
// should step down as:
|
||||
// 1000, 500, 333, 250, 200, 167, 142, 125, 111, 100, 90
|
||||
var/damage = 1000
|
||||
for(var/i in 2 to 12)
|
||||
var/obj/item/projectile/beam/in_chamber = new (src.loc)
|
||||
in_chamber.original = original
|
||||
in_chamber.starting = starting
|
||||
in_chamber.shot_from = shot_from
|
||||
in_chamber.silenced = silenced
|
||||
in_chamber.current = current
|
||||
in_chamber.yo = yo
|
||||
in_chamber.xo = xo
|
||||
in_chamber.damage = damage
|
||||
in_chamber.process()
|
||||
damage -= damage / i
|
||||
sleep(-1)
|
||||
|
||||
// Let everyone know what hit them.
|
||||
var/obj/item/projectile/beam/in_chamber = new (src.loc)
|
||||
in_chamber.original = original
|
||||
in_chamber.name = "point defense laser"
|
||||
in_chamber.starting = starting
|
||||
in_chamber.shot_from = shot_from
|
||||
in_chamber.silenced = 0
|
||||
in_chamber.firer = "Icarus" // Never displayed, but we want this to display the hit message.
|
||||
in_chamber.current = current
|
||||
in_chamber.yo = yo
|
||||
in_chamber.xo = xo
|
||||
in_chamber.damage = 0
|
||||
in_chamber.process()
|
||||
spawn(1)
|
||||
del src
|
||||
|
||||
return
|
||||
|
||||
/obj/item/projectile/icarus/guns
|
||||
process()
|
||||
var/turf/location = get_turf(src)
|
||||
//Find the world endge targetted.
|
||||
var/x = xo > 0 ? (world.maxx - location.x) / xo : xo < 0 ? (-location.x) / xo : 1.#INF
|
||||
var/y = yo > 0 ? (world.maxy - location.y) / yo : yo < 0 ? (-location.y) / yo : 1.#INF
|
||||
// Get the minimum number of steps using the rise/run shit.
|
||||
var/iterations = round(min(x,y)) - 1
|
||||
|
||||
var/turf/target = locate(location.x + iterations * xo, location.y + iterations * yo, location.z)
|
||||
var/turf/start = get_step(location, get_dir(location, target))
|
||||
var/obj/effect/meteor/small/projectile = new (start) // Let's not squish the firer.
|
||||
projectile.dest = target
|
||||
projectile.name = "main gun projectile" // stealthy
|
||||
projectile.hits = 6
|
||||
projectile.detonation_chance = 99 // it's a missile/cannon round thing!
|
||||
|
||||
spawn(0)
|
||||
projectile.throw_at(projectile.dest, 1.#INF, 5)
|
||||
walk_towards(projectile, projectile.dest, 1)
|
||||
|
||||
spawn(1)
|
||||
del src
|
||||
|
||||
return
|
||||
|
||||
/obj/item/projectile/icarus/torpedo
|
||||
//TODO
|
||||
Reference in New Issue
Block a user