From 962992d1719f6899b52effe6b70b79729c49f997 Mon Sep 17 00:00:00 2001 From: Razgriz Date: Wed, 31 Mar 2021 01:35:35 -0700 Subject: [PATCH] Added safety lock feature to phaseguns, same as frontier phaser Added safety lock feature to phaseguns, same as frontier phaser --- code/modules/projectiles/guns/energy/phase.dm | 48 ++++++++++++------- code/modules/research/designs/weapons.dm | 4 +- code/modules/research/designs/weapons_ch.dm | 31 +++++++++++- .../datums/supplypacks/munitions.dm | 4 +- maps/southern_cross/southern_cross-5.dmm | 2 +- maps/southern_cross/southern_cross-7.dmm | 2 +- .../southern_cross/structures/closets/misc.dm | 4 +- 7 files changed, 70 insertions(+), 25 deletions(-) diff --git a/code/modules/projectiles/guns/energy/phase.dm b/code/modules/projectiles/guns/energy/phase.dm index 2498aba776..8d3790a447 100644 --- a/code/modules/projectiles/guns/energy/phase.dm +++ b/code/modules/projectiles/guns/energy/phase.dm @@ -1,8 +1,9 @@ // Phase weapons go here +//CHOMP Edit: Each phase gun now has the same safety lock as frontier phasers. Every pathname now has "locked" and "unlocked", basically. This code comes from /code/modules/projectiles/guns/energy/laser_vr.dm. -/obj/item/weapon/gun/energy/phasegun +/obj/item/weapon/gun/energy/locked/phasegun name = "phase carbine" - desc = "The RayZar EW26 Artemis is a downsized energy weapon, specifically designed for use against wildlife." + desc = "The RayZar EW26 Artemis is a downsized energy weapon, specifically designed for use against wildlife. This one has a safety interlock that prevents firing while in proximity to the facility." description_fluff = "RayZar is Ward-Takahashi’s main consumer weapons brand, known for producing and licensing a wide variety of specialist energy weapons of various types and quality primarily for the civilian market." icon_state = "phasecarbine" item_state = "phasecarbine" @@ -13,18 +14,15 @@ one_handed_penalty = 15 recoil_mode = 0 //CHOMP Addition: Removes recoil for micros. -/obj/item/weapon/gun/energy/phasegun/mounted - self_recharge = 1 - use_external_power = 1 - one_handed_penalty = 0 +/obj/item/weapon/gun/energy/locked/phasegun/unlocked + desc = "The RayZar EW26 Artemis is a downsized energy weapon, specifically designed for use against wildlife." + req_access = newlist() //for toggling safety + locked = 0 + lockable = 0 -/obj/item/weapon/gun/energy/phasegun/mounted/cyborg - charge_cost = 400 - recharge_time = 7 - -/obj/item/weapon/gun/energy/phasegun/pistol +/obj/item/weapon/gun/energy/locked/phasegun/pistol name = "phase pistol" - desc = "The RayZar EW15 Apollo is an energy handgun, specifically designed for self-defense against aggressive wildlife." + desc = "The RayZar EW15 Apollo is an energy handgun, specifically designed for self-defense against aggressive wildlife. This one has a safety interlock that prevents firing while in proximity to the facility." icon_state = "phase" item_state = "taser" //I don't have an in-hand sprite, taser will be fine w_class = ITEMSIZE_NORMAL @@ -33,6 +31,12 @@ projectile_type = /obj/item/projectile/energy/phase/light one_handed_penalty = 0 +/obj/item/weapon/gun/energy/locked/phasegun/pistol/unlocked + desc = "The RayZar EW15 Apollo is an energy handgun, specifically designed for self-defense against aggressive wildlife." + req_access = newlist() //for toggling safety + locked = 0 + lockable = 0 + /obj/item/weapon/gun/energy/phasegun/pistol/mounted name = "mounted phase pistol" self_recharge = 1 @@ -42,9 +46,9 @@ charge_cost = 400 recharge_time = 7 -obj/item/weapon/gun/energy/phasegun/rifle +obj/item/weapon/gun/energy/locked/phasegun/rifle name = "phase rifle" - desc = "The RayZar EW31 Orion is a specialist energy weapon, intended for use against hostile wildlife." + desc = "The RayZar EW31 Orion is a specialist energy weapon, intended for use against hostile wildlife. This one has a safety interlock that prevents firing while in proximity to the facility." icon_state = "phaserifle" item_state = "phaserifle" wielded_item_state = "phaserifle-wielded" @@ -55,9 +59,15 @@ obj/item/weapon/gun/energy/phasegun/rifle accuracy = 15 one_handed_penalty = 30 -/obj/item/weapon/gun/energy/phasegun/cannon +obj/item/weapon/gun/energy/locked/phasegun/rifle/unlocked + desc = "The RayZar EW31 Orion is a specialist energy weapon, intended for use against hostile wildlife." + req_access = newlist() //for toggling safety + locked = 0 + lockable = 0 + +/obj/item/weapon/gun/energy/locked/phasegun/cannon name = "phase cannon" - desc = "The RayZar EW50 Gaia is a massive energy weapon, purpose-built for clearing land. You feel dirty just looking at it." + desc = "The RayZar EW50 Gaia is a massive energy weapon, purpose-built for clearing land. You feel dirty just looking at it. This one has a safety interlock that prevents firing while in proximity to the facility." icon_state = "phasecannon" item_state = "phasecannon" wielded_item_state = "phasecannon-wielded" //TODO: New Sprites @@ -67,3 +77,9 @@ obj/item/weapon/gun/energy/phasegun/rifle projectile_type = /obj/item/projectile/energy/phase/heavy/cannon accuracy = 15 one_handed_penalty = 65 + +/obj/item/weapon/gun/energy/locked/phasegun/cannon/unlocked + desc = "The RayZar EW50 Gaia is a massive energy weapon, purpose-built for clearing land. You feel dirty just looking at it." + req_access = newlist() //for toggling safety + locked = 0 + lockable = 0 \ No newline at end of file diff --git a/code/modules/research/designs/weapons.dm b/code/modules/research/designs/weapons.dm index 117f5620b3..ed9cea0a1c 100644 --- a/code/modules/research/designs/weapons.dm +++ b/code/modules/research/designs/weapons.dm @@ -132,7 +132,7 @@ ..() name = "Phase weapon prototype ([item_name])" -/**/ //VOREStation Removal Start // Chomp Edit : uncomment those weapons +/* //VOREStation Removal Start // Chomp Edit : uncomment those weapons //CHOMP Edit: Comment again, move to weapons_ch because they have weapons locks now. /datum/design/item/weapon/phase/phase_pistol id = "phasepistol" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2, TECH_POWER = 2) @@ -160,7 +160,7 @@ materials = list(DEFAULT_WALL_MATERIAL = 10000, "glass" = 2000, "silver" = 1000, "diamond" = 750) build_path = /obj/item/weapon/gun/energy/phasegun/cannon sort_string = "MACAD" -/**/ //VOREStation Removal End // Chomp Edit : uncomment those weapons +*/ //VOREStation Removal End // Chomp Edit : uncomment those weapons // Other weapons diff --git a/code/modules/research/designs/weapons_ch.dm b/code/modules/research/designs/weapons_ch.dm index 6461d319fb..d035cbadc5 100644 --- a/code/modules/research/designs/weapons_ch.dm +++ b/code/modules/research/designs/weapons_ch.dm @@ -5,4 +5,33 @@ req_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 3000) build_path = /obj/item/weapon/gun/launcher/confetti_cannon - sort_string = "MAAVD" \ No newline at end of file + sort_string = "MAAVD" + +//Phase weapon with lock safeties. +/datum/design/item/weapon/phase/phase_pistol + id = "phasepistol" + req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2, TECH_POWER = 2) + materials = list(DEFAULT_WALL_MATERIAL = 4000, MAT_COPPER = 30) + build_path = /obj/item/weapon/gun/energy/locked/phasegun/pistol + sort_string = "MACAA" + +/datum/design/item/weapon/phase/phase_carbine + id = "phasecarbine" + req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2, TECH_POWER = 2) + materials = list(DEFAULT_WALL_MATERIAL = 6000, "glass" = 1500, MAT_COPPER = 40) + build_path = /obj/item/weapon/gun/energy/locked/phasegun + sort_string = "MACAB" + +/datum/design/item/weapon/phase/phase_rifle + id = "phaserifle" + req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3) + materials = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 2000, "silver" = 500) + build_path = /obj/item/weapon/gun/energy/locked/phasegun/rifle + sort_string = "MACAC" + +/datum/design/item/weapon/phase/phase_cannon + id = "phasecannon" + req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 4, TECH_POWER = 4) + materials = list(DEFAULT_WALL_MATERIAL = 10000, "glass" = 2000, "silver" = 1000, "diamond" = 750) + build_path = /obj/item/weapon/gun/energy/locked/phasegun/cannon + sort_string = "MACAD" \ No newline at end of file diff --git a/maps/southern_cross/datums/supplypacks/munitions.dm b/maps/southern_cross/datums/supplypacks/munitions.dm index ee51fc4f0c..143810ff57 100644 --- a/maps/southern_cross/datums/supplypacks/munitions.dm +++ b/maps/southern_cross/datums/supplypacks/munitions.dm @@ -17,7 +17,7 @@ /datum/supply_pack/munitions/phase_carbines_explorer name = "Weapons - Surplus Phase Carbines" contains = list( - /obj/item/weapon/gun/energy/phasegun = 2, + /obj/item/weapon/gun/energy/locked/phasegun = 2, ) cost = 25 containertype = /obj/structure/closet/crate/secure/ward @@ -27,7 +27,7 @@ /datum/supply_pack/munitions/phase_rifles_explorer name = "Weapons - Phase Rifles" contains = list( - /obj/item/weapon/gun/energy/phasegun/rifle = 2, + /obj/item/weapon/gun/energy/locked/phasegun/rifle = 2, ) cost = 50 containertype = /obj/structure/closet/crate/secure/ward diff --git a/maps/southern_cross/southern_cross-5.dmm b/maps/southern_cross/southern_cross-5.dmm index 19875016b2..88e4743500 100644 --- a/maps/southern_cross/southern_cross-5.dmm +++ b/maps/southern_cross/southern_cross-5.dmm @@ -662,7 +662,7 @@ "nF" = (/obj/structure/snowman{name = "Frosty"},/turf/simulated/floor/outdoors/snow/sif/planetuse,/area/surface/outside/plains/outpost) "nG" = (/obj/effect/overlay/snow/floor,/obj/machinery/light/small{dir = 8},/obj/structure/disposalpipe/segment,/obj/structure/cable/heavyduty{icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/tiled/steel/sif/planetuse,/area/surface/outpost/security) "nH" = (/obj/effect/floor_decal/borderfloor,/obj/effect/floor_decal/corner/white/border,/obj/machinery/door/firedoor/glass/hidden{dir = 1},/turf/simulated/floor/tiled,/area/surface/outpost/main/corridor/right_upper) -"nI" = (/obj/structure/table/rack/shelf,/obj/effect/floor_decal/borderfloor{dir = 1},/obj/item/weapon/gun/energy/phasegun/rifle{pixel_y = 3},/obj/item/weapon/gun/energy/phasegun/rifle{pixel_y = -4},/obj/effect/floor_decal/corner/brown/border{dir = 1},/obj/machinery/camera/network/mining{c_tag = "PO - Mining Hallway 1"},/turf/simulated/floor/tiled,/area/surface/outpost/mining_main/storage) +"nI" = (/obj/structure/table/rack/shelf,/obj/effect/floor_decal/borderfloor{dir = 1},/obj/item/weapon/gun/energy/locked/phasegun/rifle{pixel_y = 3},/obj/item/weapon/gun/energy/locked/phasegun/rifle{pixel_y = -4},/obj/effect/floor_decal/corner/brown/border{dir = 1},/obj/machinery/camera/network/mining{c_tag = "PO - Mining Hallway 1"},/turf/simulated/floor/tiled,/area/surface/outpost/mining_main/storage) "nJ" = (/obj/effect/floor_decal/steeldecal/steel_decals10,/obj/effect/floor_decal/borderfloorwhite{dir = 1},/obj/effect/floor_decal/corner/paleblue/border{dir = 1},/obj/structure/window/reinforced{dir = 1; health = 1e+006; req_access = list(5)},/obj/structure/table/rack,/obj/item/weapon/storage/belt/medical/emt,/obj/item/weapon/storage/belt/medical/emt,/obj/item/weapon/storage/belt/medical/emt,/obj/item/clothing/glasses/hud/health,/obj/item/clothing/glasses/hud/health,/obj/item/clothing/glasses/hud/health,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/window/brigdoor/southleft{req_access = list(5); req_one_access = list(5,43)},/turf/simulated/floor/tiled/white,/area/surface/outpost/main/search_and_rescue) "nL" = (/obj/structure/sink{pixel_y = 16},/obj/effect/floor_decal/borderfloor{dir = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/obj/effect/floor_decal/corner/purple/border{dir = 1},/obj/effect/floor_decal/borderfloor/corner2{dir = 1},/obj/effect/floor_decal/corner/purple/bordercorner2{dir = 1},/turf/simulated/floor/tiled,/area/surface/outpost/main/janitor) "nM" = (/turf/simulated/wall/r_wall,/area/surface/outpost/main/airlock/right_two) diff --git a/maps/southern_cross/southern_cross-7.dmm b/maps/southern_cross/southern_cross-7.dmm index 53f48ad399..356e289713 100644 --- a/maps/southern_cross/southern_cross-7.dmm +++ b/maps/southern_cross/southern_cross-7.dmm @@ -1585,7 +1585,7 @@ "Qt" = (/obj/effect/floor_decal/industrial/warning{dir = 6},/obj/machinery/atmospherics/unary/vent_pump/high_volume{dir = 1; frequency = 1380; id_tag = "ursula_pump"},/turf/simulated/shuttle/plating,/area/shuttle/ursula) "Qx" = (/obj/machinery/atmospherics/pipe/simple/hidden/yellow{dir = 8},/turf/simulated/shuttle/wall/voidcraft/orange,/area/shuttle/echidna) "Qy" = (/obj/structure/window/plastitanium/full,/obj/structure/window/reinforced/survival_pod{dir = 1},/obj/structure/window/reinforced/survival_pod,/obj/structure/grille/rustic{health = 25; name = "reinforced grille"},/obj/machinery/door/blast/regular/open{id = "stargazer_blast"; name = "window blast shield"},/turf/simulated/shuttle/plating,/area/shuttle/stargazer) -"QD" = (/obj/item/weapon/shovel,/obj/item/weapon/pickaxe,/obj/item/weapon/tool/crowbar,/obj/structure/table/rack/shelf/steel,/obj/item/weapon/storage/firstaid/regular,/obj/item/clothing/accessory/permit/gun/planetside,/obj/item/weapon/storage/belt/utility/full,/obj/item/weapon/gun/energy/phasegun/rifle{pixel_y = -4},/obj/item/weapon/gun/energy/locked/frontier/holdout,/obj/item/clothing/accessory/holster/hip,/obj/item/device/gps,/obj/effect/floor_decal/industrial/outline/grey,/turf/simulated/shuttle/floor/yellow,/area/shuttle/echidna) +"QD" = (/obj/item/weapon/shovel,/obj/item/weapon/pickaxe,/obj/item/weapon/tool/crowbar,/obj/structure/table/rack/shelf/steel,/obj/item/weapon/storage/firstaid/regular,/obj/item/clothing/accessory/permit/gun/planetside,/obj/item/weapon/storage/belt/utility/full,/obj/item/weapon/gun/energy/locked/phasegun/rifle{pixel_y = -4},/obj/item/weapon/gun/energy/locked/frontier/holdout,/obj/item/clothing/accessory/holster/hip,/obj/item/device/gps,/obj/effect/floor_decal/industrial/outline/grey,/turf/simulated/shuttle/floor/yellow,/area/shuttle/echidna) "QE" = (/obj/machinery/button/remote/airlock{desiredstate = 1; dir = 8; id = "stargazer_hatch"; name = "Rear Hatch Control"; pixel_x = 26; req_access = null; specialfunctions = 4},/obj/machinery/atmospherics/pipe/manifold/hidden/yellow,/turf/simulated/shuttle/plating,/area/shuttle/stargazer) "QH" = (/obj/machinery/autolathe,/turf/simulated/shuttle/floor/purple,/area/shuttle/ursula) "QS" = (/turf/simulated/shuttle/wall/voidcraft/no_join,/area/shuttle/needle) diff --git a/maps/southern_cross/structures/closets/misc.dm b/maps/southern_cross/structures/closets/misc.dm index ee1baf6e52..7d668945c6 100644 --- a/maps/southern_cross/structures/closets/misc.dm +++ b/maps/southern_cross/structures/closets/misc.dm @@ -28,8 +28,8 @@ req_one_access = list(access_explorer,access_brig) starts_with = list( - /obj/item/weapon/gun/energy/phasegun = 2, - /obj/item/weapon/gun/energy/phasegun/pistol, + /obj/item/weapon/gun/energy/locked/phasegun = 2, + /obj/item/weapon/gun/energy/locked/phasegun/pistol, /obj/item/weapon/cell/device/weapon = 2, /obj/item/clothing/accessory/permit/gun/planetside)