From 5d1d652ea4a078f205db529714b300939ef904af Mon Sep 17 00:00:00 2001 From: keronshb Date: Wed, 5 Feb 2020 18:28:00 -0500 Subject: [PATCH] Buffs the Pirate Ship to be bomb proof Title, also makes a few computers/machines indestructible and buffs turret health. It also allows turrets to be repairable now. --- _maps/shuttles/pirate_default.dmm | 28 +++++---- .../machinery/porta_turret/portable_turret.dm | 22 ++++++- .../objects/effects/spawners/structure.dm | 7 +++ code/game/objects/structures/window.dm | 24 ++++++++ .../turfs/simulated/wall/mineral_walls.dm | 61 +++++++++++++++++++ code/modules/events/pirates.dm | 5 ++ 6 files changed, 134 insertions(+), 13 deletions(-) diff --git a/_maps/shuttles/pirate_default.dmm b/_maps/shuttles/pirate_default.dmm index 1c8670d5b6..959e067a9d 100644 --- a/_maps/shuttles/pirate_default.dmm +++ b/_maps/shuttles/pirate_default.dmm @@ -89,7 +89,7 @@ /turf/open/floor/pod/dark, /area/shuttle/pirate) "aj" = ( -/turf/closed/wall/mineral/plastitanium/nodiagonal, +/turf/closed/wall/mineral/plastitaniumpirate/nodiagonal, /area/shuttle/pirate) "ak" = ( /obj/machinery/airalarm/all_access{ @@ -469,7 +469,7 @@ icon_state = "standard_lethal"; mode = 1 }, -/turf/closed/wall/mineral/plastitanium/nodiagonal, +/turf/closed/wall/mineral/plastitaniumpirate/nodiagonal, /area/shuttle/pirate) "aR" = ( /obj/machinery/porta_turret/syndicate/energy{ @@ -477,7 +477,7 @@ icon_state = "standard_lethal"; mode = 1 }, -/turf/closed/wall/mineral/plastitanium, +/turf/closed/wall/mineral/plastitaniumpirate, /area/shuttle/pirate) "aS" = ( /obj/effect/turf_decal/stripes/line, @@ -486,7 +486,7 @@ /area/shuttle/pirate) "aU" = ( /obj/structure/sign/departments/engineering, -/turf/closed/wall/mineral/plastitanium/nodiagonal, +/turf/closed/wall/mineral/plastitaniumpirate/nodiagonal, /area/shuttle/pirate) "aV" = ( /obj/effect/mob_spawn/human/pirate{ @@ -897,7 +897,7 @@ icon_state = "standard_lethal"; mode = 1 }, -/turf/closed/wall/mineral/plastitanium, +/turf/closed/wall/mineral/plastitaniumpirate, /area/shuttle/pirate) "dy" = ( /obj/structure/chair/wood/normal, @@ -948,7 +948,8 @@ /turf/open/floor/pod/light, /area/shuttle/pirate) "ep" = ( -/obj/structure/window/reinforced{ +/obj/structure/window/plastitaniumpirate{ +//obj/structure/window/reinforced{ dir = 1; pixel_y = 1 }, @@ -978,7 +979,8 @@ /turf/open/floor/plating/airless, /area/shuttle/pirate) "ex" = ( -/obj/structure/window/reinforced, +/obj/structure/window/plastitaniumpirate +//obj/structure/window/reinforced, /obj/structure/frame/machine, /obj/item/wrench, /turf/open/floor/plating/airless, @@ -988,17 +990,19 @@ id = "piratebridge" }, /obj/structure/grille, -/obj/structure/window/plastitanium, +/obj/structure/window/plastitaniumpirate, /turf/open/floor/plating, /area/shuttle/pirate) "ez" = ( -/obj/structure/window/reinforced, +/obj/structure/window/plastitaniumpirate +//obj/structure/window/reinforced, /obj/structure/frame/machine, /obj/item/stack/cable_coil/cut/red, /turf/open/floor/plating/airless, /area/shuttle/pirate) "eA" = ( -/obj/structure/window/reinforced{ +/obj/structure/window/plastitaniumpirate +//obj/structure/window/reinforced{ dir = 1; pixel_y = 1 }, @@ -1016,7 +1020,7 @@ /turf/open/floor/plasteel, /area/shuttle/pirate) "fW" = ( -/turf/closed/wall/mineral/plastitanium, +/turf/closed/wall/mineral/plastitaniumpirate, /area/shuttle/pirate) "fY" = ( /obj/machinery/atmospherics/pipe/manifold/supply/hidden{ @@ -1090,7 +1094,7 @@ icon_state = "standard_lethal"; mode = 1 }, -/turf/closed/wall/mineral/plastitanium, +/turf/closed/wall/mineral/plastitaniumpirate, /area/shuttle/pirate) "yi" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden{ diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index a27cb9b78c..1d0c3b4ead 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -348,6 +348,22 @@ spark_system.start() //creates some sparks because they look cool qdel(cover) //deletes the cover - no need on keeping it there! +//turret healing +/obj/machinery/porta_turret/attackby(obj/item/I, mob/living/user, params) + if(istype(I, /obj/item/weldingtool) && user.a_intent == INTENT_HELP) + if(obj_integrity < max_integrity) + if(!I.tool_start_check(user, amount=0)) + return + user.visible_message("[user] is welding the turret.", \ + "You begin repairing the turret...", \ + "You hear welding.") + if(I.use_tool(src, user, 40, volume=50)) + obj_integrity = max_integrity + user.visible_message("[user.name] has repaired [src].", \ + "You finish repairing the turret.") + else + to_chat(user, "The turret doesn't need repairing.") + return /obj/machinery/porta_turret/process() @@ -670,7 +686,11 @@ nonlethal_projectile_sound = 'sound/weapons/taser2.ogg' lethal_projectile = /obj/item/projectile/beam/laser lethal_projectile_sound = 'sound/weapons/laser.ogg' - desc = "An energy blaster auto-turret." + desc = "An energy blaster auto-turret. Use a welder to fix." + explosion_block = 50 + max_integrity = 350 + integrity_failure = 20 + /obj/machinery/porta_turret/syndicate/energy/heavy icon_state = "standard_stun" diff --git a/code/game/objects/effects/spawners/structure.dm b/code/game/objects/effects/spawners/structure.dm index a5a4dfb44b..34af40cb07 100644 --- a/code/game/objects/effects/spawners/structure.dm +++ b/code/game/objects/effects/spawners/structure.dm @@ -163,6 +163,13 @@ again. icon_state = "plastitaniumwindow_spawner" spawn_list = list(/obj/structure/grille, /obj/structure/window/plastitanium) +//plastitaniumpirate window + +/obj/effect/spawner/structure/window/plastitaniumpirate + name = "plastitanium window spawner" + icon_state = "plastitaniumwindow_spawner" + explosion_block = 50 + spawn_list = list(/obj/structure/grille, /obj/structure/window/plastitaniumpirate) //ice window diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 14a7e445c1..99a8b94c5a 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -595,6 +595,30 @@ /obj/structure/window/plastitanium/unanchored anchored = FALSE +//pirate ship windows +/obj/structure/window/plastitaniumpirate + name = "plastitanium window" + desc = "Yarr this window be explosion proof!" + icon = 'icons/obj/smooth_structures/plastitanium_window.dmi' + icon_state = "plastitanium_window" + dir = FULLTILE_WINDOW_DIR + max_integrity = 100 + wtype = "shuttle" + fulltile = TRUE + flags_1 = PREVENT_CLICK_UNDER_1 + reinf = TRUE + heat_resistance = 1600 + armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100) + smooth = SMOOTH_TRUE + canSmoothWith = null + explosion_block = 50 + level = 3 + glass_type = /obj/item/stack/sheet/plastitaniumglass + glass_amount = 2 + +/obj/structure/window/plastitaniumpirate/unanchored + anchored = FALSE + /obj/structure/window/reinforced/clockwork name = "brass window" desc = "A paper-thin pane of translucent yet reinforced brass." diff --git a/code/game/turfs/simulated/wall/mineral_walls.dm b/code/game/turfs/simulated/wall/mineral_walls.dm index d55cb0b475..7d82a20b91 100644 --- a/code/game/turfs/simulated/wall/mineral_walls.dm +++ b/code/game/turfs/simulated/wall/mineral_walls.dm @@ -303,3 +303,64 @@ /turf/closed/wall/mineral/plastitanium/copyTurf(turf/T) . = ..() T.transform = transform + +/////////////////////Pirate Plastitanium walls///////////////////// + +/turf/closed/wall/mineral/plastitaniumpirate + name = "wall" + desc = "Yarr just try to blow this to smithereens!" + icon = 'icons/turf/walls/plastitanium_wall.dmi' + icon_state = "map-shuttle" + explosion_block = 50 + sheet_type = /obj/item/stack/sheet/mineral/plastitanium + smooth = SMOOTH_MORE|SMOOTH_DIAGONAL + canSmoothWith = list(/turf/closed/wall/mineral/plastitaniumpirate, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/plastitaniumpirate, /obj/structure/shuttle/engine, /obj/structure/falsewall/plastitanium) + +/turf/closed/wall/mineral/plastitaniumpirate/nodiagonal + smooth = SMOOTH_MORE + icon_state = "map-shuttle_nd" + explosion_block = 50 + +/turf/closed/wall/mineral/plastitaniumpirate/nosmooth + icon = 'icons/turf/shuttle.dmi' + icon_state = "wall" + smooth = SMOOTH_FALSE + explosion_block = 50 + +/turf/closed/wall/mineral/plastitaniumpirate/overspace + icon_state = "map-overspace" + fixed_underlay = list("space"=1) + explosion_block = 50 + +/turf/closed/wall/mineral/plastitaniumpirate/explosive/ex_act(severity) + var/datum/explosion/acted_explosion = null + for(var/datum/explosion/E in GLOB.explosions) + if(E.explosion_id == explosion_id) + acted_explosion = E + break + if(acted_explosion && istype(acted_explosion.explosion_source, /obj/item/bombcore)) + var/obj/item/bombcore/large/bombcore = new(get_turf(src)) + bombcore.detonate() + ..() + +//have to copypaste this code +/turf/closed/wall/mineral/plastitaniumpirate/interior/copyTurf(turf/T) + if(T.type != type) + T.ChangeTurf(type) + if(underlays.len) + T.underlays = underlays + if(T.icon_state != icon_state) + T.icon_state = icon_state + if(T.icon != icon) + T.icon = icon + if(color) + T.atom_colours = atom_colours.Copy() + T.update_atom_colour() + if(T.dir != dir) + T.setDir(dir) + T.transform = transform + return T + +/turf/closed/wall/mineral/plastitaniumpirate/copyTurf(turf/T) + . = ..() + T.transform = transform \ No newline at end of file diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm index 8bc5491970..ab9ab96678 100644 --- a/code/modules/events/pirates.dm +++ b/code/modules/events/pirates.dm @@ -177,6 +177,7 @@ shuttleId = "pirateship" icon_screen = "syndishuttle" icon_keyboard = "syndie_key" + resistance_flags = INDESTRUCTIBLE light_color = LIGHT_COLOR_RED possible_destinations = "pirateship_away;pirateship_home;pirateship_custom" @@ -184,6 +185,7 @@ name = "pirate shuttle navigation computer" desc = "Used to designate a precise transit location for the pirate shuttle." shuttleId = "pirateship" + resistance_flags = INDESTRUCTIBLE lock_override = CAMERA_LOCK_STATION shuttlePortId = "pirateship_custom" x_offset = 9 @@ -226,6 +228,7 @@ desc = "This sophisticated machine scans the nearby space for items of value." icon = 'icons/obj/machines/research.dmi' icon_state = "tdoppler" + resistance_flags = INDESTRUCTIBLE density = TRUE var/cooldown = 300 var/next_use = 0 @@ -259,6 +262,7 @@ name = "cargo hold pad" icon = 'icons/obj/telescience.dmi' icon_state = "lpad-idle-o" + resistance_flags = INDESTRUCTIBLE var/idle_state = "lpad-idle-o" var/warmup_state = "lpad-idle" var/sending_state = "lpad-beam" @@ -272,6 +276,7 @@ /obj/machinery/computer/piratepad_control name = "cargo hold control terminal" + resistance_flags = INDESTRUCTIBLE var/status_report = "Idle" var/obj/machinery/piratepad/pad var/warmup_time = 100