From dadea3c7faa5a1374518cc5773d1f62165d78fed Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 1 Feb 2015 21:02:48 -0700 Subject: [PATCH 1/4] 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. --- code/game/gamemodes/meteor/meteors.dm | 13 ++-- code/game/turfs/simulated/walls.dm | 13 ++-- code/game/turfs/simulated/walls_reinforced.dm | 5 +- .../projectiles/guns/energy/special.dm | 57 ++++++++++++++++ .../modules/projectiles/projectile/special.dm | 66 +++++++++++++++++++ 5 files changed, 140 insertions(+), 14 deletions(-) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index fce27f393ce..1edb533daaa 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -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 diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 572ed0ff8db..9b85c90e161 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -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 diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index b08363a7153..5eddfc8b71c 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -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) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index d5417496bfa..7fc8fd3b4c5 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -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]" + . = ..() diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 49cd4209943..3b1c470530f 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -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 \ No newline at end of file From 84c40171e7b8d00ef7a3632b7ad33318c6f78337 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Tue, 3 Feb 2015 01:25:57 -0700 Subject: [PATCH 2/4] The icarus gun now acts as a spotter. The Icarus can now be fired via adminverbs. --- baystation12.dme | 1 + code/modules/admin/admin_verbs.dm | 3 + code/modules/admin/verbs/icarus.dm | 125 ++++++++++++++++++ code/modules/projectiles/guns/energy/pulse.dm | 8 +- .../projectiles/guns/energy/special.dm | 32 ++--- code/modules/projectiles/projectile/beams.dm | 2 +- .../modules/projectiles/projectile/special.dm | 64 +-------- 7 files changed, 153 insertions(+), 82 deletions(-) create mode 100644 code/modules/admin/verbs/icarus.dm diff --git a/baystation12.dme b/baystation12.dme index 3682d724958..4f1c048ec2e 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -789,6 +789,7 @@ #include "code\modules\admin\verbs\debug.dm" #include "code\modules\admin\verbs\diagnostics.dm" #include "code\modules\admin\verbs\getlogs.dm" +#include "code\modules\admin\verbs\icarus.dm" #include "code\modules\admin\verbs\mapping.dm" #include "code\modules\admin\verbs\massmodvar.dm" #include "code\modules\admin\verbs\modifyvariables.dm" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index a67e42ca2ba..dbf73d65fda 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -109,6 +109,9 @@ var/list/admin_verbs_fun = list( var/list/admin_verbs_spawn = list( /datum/admins/proc/spawn_atom, /*allows us to spawn instances*/ /client/proc/respawn_character, + /client/proc/FireLaser, + /client/proc/FireCannons, + /client/proc/ChangeIcarusPosition, /client/proc/virus2_editor ) var/list/admin_verbs_server = list( diff --git a/code/modules/admin/verbs/icarus.dm b/code/modules/admin/verbs/icarus.dm new file mode 100644 index 00000000000..cccda899b34 --- /dev/null +++ b/code/modules/admin/verbs/icarus.dm @@ -0,0 +1,125 @@ +/client/proc/FireLaser() + set name = "Fire the Icarus lasers" + set desc = "Fires a laser bolt at your position. You should only do this as a(n) (a)ghost" + set category = "Fun" + + if(!src.holder) + src << "Only administrators may use this command." + return + + Icarus_FireLaser(get_turf(src.mob)) + + +/client/proc/FireCannons() + set name = "Fire the Icarus cannons" + set desc = "Fires an explosive missile at your position. You should only do this as a(n) (a)ghost." + set category = "Fun" + + if(!src.holder) + src << "Only administrators may use this command." + return + + Icarus_FireCannon(get_turf(src.mob)) + + +/client/proc/ChangeIcarusPosition() + set name = "Adjust Icarus Position" + set desc = "Lets you chose the position of the Icarus in regards to the map." + set category = "Fun" + + if(!src.holder) + src << "Only administrators may use this command." + return + + Icarus_SetPosition(src) + +var/icarus_position = SOUTH + +proc/Icarus_FireLaser(var/turf/target) + // Find the world edge to fire from. + var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x + var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y + var/x_off = x != target.x ? abs(target.x - x) : INFINITY + var/y_off = y != target.y ? abs(target.y - y) : INFINITY + // Get the minimum number of steps using the rise/run shit. + var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing. + + // Now we can get the location of the start. + x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0) + y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0) + + var/turf/start = locate(x, y, target.z) + + // 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 (start) + in_chamber.original = target + in_chamber.starting = start + in_chamber.silenced = 1 + in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0 + in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0 + in_chamber.damage = damage + in_chamber.kill_count = 500 + in_chamber.process() + damage -= damage / i + sleep(-1) + + // Let everyone know what hit them. + var/obj/item/projectile/beam/in_chamber = new (start) + in_chamber.original = target + in_chamber.starting = start + in_chamber.silenced = 0 + in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0 + in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0 + in_chamber.kill_count = 500 + in_chamber.damage = 0 + in_chamber.name = "point defense laser" + in_chamber.firer = "Icarus" // Never displayed, but we want this to display the hit message. + in_chamber.process() + +proc/Icarus_FireCannon(var/turf/target) + // Find the world edge to fire from. + var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x + var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y + var/x_off = x != target.x ? abs(target.x - x) : INFINITY + var/y_off = y != target.y ? abs(target.y - y) : INFINITY + // Get the minimum number of steps using the rise/run shit. + var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing. + + // Now we can get the location of the start. + x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0) + y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0) + + var/turf/start = locate(x, y, target.z) + + // Now we find the corresponding turf on the other side of the level. + // Yeah, yeah. Overuse of the terinary operator. So sue me. + x = icarus_position & EAST ? 1 : icarus_position & WEST ? world.maxx : target.x + y = icarus_position & NORTH ? 1 : icarus_position & SOUTH ? world.maxy : target.y + x_off = x != target.x ? abs(target.x - x) : INFINITY + y_off = y != target.y ? abs(target.y - y) : INFINITY + iterations = round(min(x_off, y_off)) + x = target.x + (icarus_position & EAST ? -iterations : icarus_position & WEST ? iterations : 0) + y = target.y + (icarus_position & NORTH ? -iterations : icarus_position & SOUTH ? iterations : 0) + target = locate(x, y, target.z) + + // Finally fire the fucker. + var/obj/effect/meteor/small/projectile = new (start) + projectile.dest = target + projectile.name = "main gun projectile" // stealthy + projectile.hits = 6 + projectile.detonation_chance = 99 // it's a missile/cannon round thing! + + // Make sure it travels + spawn(0) + walk_towards(projectile, projectile.dest, 1) + +proc/Icarus_SetPosition(var/user) + var/global/list/directions = list("North" = 1, "North East" = 5, "East" = 4, "South East" = 6, "South" = 2, "South West" = 10, "West" = 8, "North West" = 9) + var/direction = input(user, "Where should the Icarus fire from?", "Icarus Comms") as null|anything in directions + if(!direction) + return + + icarus_position = directions[direction] \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 9b0a22e06c9..f9644779fc6 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -17,19 +17,19 @@ mode = 0 charge_cost = 100 fire_sound = 'sound/weapons/Taser.ogg' - user << "\red [src.name] is now set to stun." + user << "\red \The [src] is now set to stun." projectile_type = /obj/item/projectile/beam/stun if(0) mode = 1 charge_cost = 100 fire_sound = 'sound/weapons/Laser.ogg' - user << "\red [src.name] is now set to kill." + user << "\red \The [src] is now set to kill." projectile_type = /obj/item/projectile/beam if(1) mode = 2 charge_cost = 200 fire_sound = 'sound/weapons/pulse.ogg' - user << "\red [src.name] is now set to DESTROY." + user << "\red \The [name] is now set to DESTROY." projectile_type = /obj/item/projectile/beam/pulse return @@ -55,7 +55,7 @@ fire_delay = 10 attack_self(mob/living/user as mob) - user << "\red [src.name] has three settings, and they are all DESTROY." + user << "\red \The [src] has three settings, and they are all DESTROY." diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 7fc8fd3b4c5..80419171bf3 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -235,43 +235,37 @@ obj/item/weapon/gun/energy/staff/focus zoom() +// Serves as a target spotter for the Icarus. /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.." + name = "rubber ducky" + desc = "It's a cute rubber duck. With an evil gleam in it's eye." 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." + if(projectile_type == "/obj/item/projectile/icarus/pointdefense") projectile_type = "/obj/item/projectile/icarus/guns" - user << "You switch to using the main guns." - + user << "You inform the Icarus to switch to 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." + user << "You inform the Icarus to switch to the point-defense lasers." + . = ..() update_icon() return - verb/fuckshitup() - set name = "fuckshitup" - set desc = "This will kill a lot of people." - set hidden = 1 + verb/SetIcarusAngle() + set src in usr + set name = "Set Firing Angle" + set desc = "Sets the angle from which the icarus will fire." + set category = "Object" - 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." + Icarus_SetPosition(usr) /obj/item/weapon/gun/energy/variable diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index ecea772e70d..23ee20e1327 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -113,7 +113,7 @@ var/list/beam_master = list() /obj/item/projectile/beam/emitter name = "emitter beam" icon_state = "emitter" - damage = 30 + damage = 0 // The actual damage is computed in /code/modules/power/singularity/emitter.dm /obj/item/projectile/beam/lastertag/blue name = "lasertag beam" diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 3b1c470530f..1f5bb6a9cf4 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -140,66 +140,14 @@ /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() + Icarus_FireLaser(get_turf(original)) 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 \ No newline at end of file +/obj/item/projectile/icarus/guns/process() + Icarus_FireCannon(get_turf(original)) + spawn + del src + return \ No newline at end of file From c8d621465756593e2696954f63c7ebb141fa359f Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 4 Feb 2015 11:08:48 -0700 Subject: [PATCH 3/4] Fix indent thing for pointdefense --- code/modules/projectiles/projectile/special.dm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 1f5bb6a9cf4..c7c2c05c4a8 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -138,16 +138,15 @@ M.adjustBrainLoss(20) M.hallucination += 20 -/obj/item/projectile/icarus/pointdefense - process() - Icarus_FireLaser(get_turf(original)) - spawn(1) - del src +/obj/item/projectile/icarus/pointdefense/process() + Icarus_FireLaser(get_turf(original)) + spawn + del src - return + return /obj/item/projectile/icarus/guns/process() Icarus_FireCannon(get_turf(original)) spawn del src - return \ No newline at end of file + return From a78ef817126e342384ff6e34780f2181e3fc3349 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 4 Feb 2015 11:10:13 -0700 Subject: [PATCH 4/4] To make PsiOmegaDelta happy I hate this format. Bluh bluh huge bitch --- .../projectiles/guns/energy/special.dm | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 80419171bf3..d1e11d7942d 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -246,26 +246,26 @@ obj/item/weapon/gun/energy/staff/focus charge_cost = 0 silenced = 1 - attack_self(mob/living/user as mob) - if(projectile_type == "/obj/item/projectile/icarus/pointdefense") - projectile_type = "/obj/item/projectile/icarus/guns" - user << "You inform the Icarus to switch to the main guns." - else - projectile_type = "/obj/item/projectile/icarus/pointdefense" - user << "You inform the Icarus to switch to the point-defense lasers." +/obj/item/weapon/gun/energy/icarus/attack_self(mob/living/user as mob) + if(projectile_type == "/obj/item/projectile/icarus/pointdefense") + projectile_type = "/obj/item/projectile/icarus/guns" + user << "You inform the Icarus to switch to the main guns." + else + projectile_type = "/obj/item/projectile/icarus/pointdefense" + user << "You inform the Icarus to switch to the point-defense lasers." - . = ..() + . = ..() - update_icon() - return +/obj/item/weapon/gun/energy/icarus/update_icon() + return - verb/SetIcarusAngle() - set src in usr - set name = "Set Firing Angle" - set desc = "Sets the angle from which the icarus will fire." - set category = "Object" +/obj/item/weapon/gun/energy/icarus/verb/SetIcarusAngle() + set src in usr + set name = "Set Firing Angle" + set desc = "Sets the angle from which the icarus will fire." + set category = "Object" - Icarus_SetPosition(usr) + Icarus_SetPosition(usr) /obj/item/weapon/gun/energy/variable @@ -274,13 +274,12 @@ obj/item/weapon/gun/energy/staff/focus charge_cost = 0 silenced = 1 - update_icon() - return +/obj/item/weapon/gun/energy/variable/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 ..() +/obj/item/weapon/gun/energy/variable/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]" - . = ..() + . = ..()