mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +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:
@@ -85,6 +85,9 @@
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/hits = 1
|
||||
var/detonation_chance = 15
|
||||
var/power = 4
|
||||
var/power_step = 1
|
||||
var/dest
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
@@ -92,6 +95,7 @@
|
||||
name = "small meteor"
|
||||
icon_state = "smallf"
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
power = 2
|
||||
|
||||
/obj/effect/meteor/Bump(atom/A)
|
||||
spawn(0)
|
||||
@@ -105,8 +109,8 @@
|
||||
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
|
||||
if(!istype(A,/obj/machinery/power/emitter) && \
|
||||
!istype(A,/obj/machinery/field_generator) && \
|
||||
prob(15))
|
||||
explosion(src.loc, 4, 5, 6, 7, 0)
|
||||
prob(detonation_chance))
|
||||
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -120,6 +124,7 @@
|
||||
/obj/effect/meteor/big
|
||||
name = "big meteor"
|
||||
hits = 5
|
||||
power = 1
|
||||
|
||||
ex_act(severity)
|
||||
return
|
||||
@@ -143,8 +148,8 @@
|
||||
explosion(src.loc, 0, 1, 2, 3, 0)
|
||||
|
||||
if (--src.hits <= 0)
|
||||
if(prob(15) && !istype(A, /obj/structure/grille))
|
||||
explosion(src.loc, 1, 2, 3, 4, 0)
|
||||
if(prob(detonation_chance) && !istype(A, /obj/structure/grille))
|
||||
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
var/rotting = 0
|
||||
|
||||
var/damage = 0
|
||||
var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
|
||||
var/armor = 0.5 // Damage is multiplied by this
|
||||
var/damage_cap = 150 //Wall will break down to girders if damage reaches this point
|
||||
|
||||
var/damage_overlay
|
||||
var/global/damage_overlays[8]
|
||||
@@ -30,7 +29,7 @@
|
||||
return
|
||||
|
||||
//cap the amount of damage, so that things like emitters can't destroy walls in one hit.
|
||||
var/damage = min(Proj.damage, 100) * armor
|
||||
var/damage = min(Proj.damage, 100)
|
||||
|
||||
take_damage(damage)
|
||||
return
|
||||
@@ -39,12 +38,12 @@
|
||||
..()
|
||||
if(ismob(AM))
|
||||
return
|
||||
|
||||
|
||||
var/tforce = AM:throwforce * (speed/THROWFORCE_SPEED_DIVISOR)
|
||||
if (tforce < 15)
|
||||
return
|
||||
|
||||
take_damage(tforce * armor)
|
||||
|
||||
take_damage(tforce)
|
||||
|
||||
/turf/simulated/wall/Del()
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||
@@ -475,7 +474,7 @@
|
||||
|
||||
else if(istype(W,/obj/item/weapon/rcd)) //I bitterly resent having to write this. ~Z
|
||||
return
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/reagent_containers))
|
||||
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
damage_cap = 500
|
||||
damage_cap = 800
|
||||
max_temperature = 6000
|
||||
armor = 0.1 // Only 10% damage from gunfire, it's made from strong alloys and stuff.
|
||||
|
||||
walltype = "rwall"
|
||||
|
||||
@@ -294,7 +293,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/reagent_containers))
|
||||
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
|
||||
|
||||
|
||||
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
|
||||
else if(!d_state)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -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