Merge pull request #2987 from Cyantime/expgun2

Adds frontier lasers to expedition prep room
This commit is contained in:
Aronai Sieyes
2018-02-08 01:21:46 -05:00
committed by GitHub
8 changed files with 118 additions and 3 deletions
+9
View File
@@ -0,0 +1,9 @@
/datum/supply_packs/munitions/expeditionguns
name = "Frontier phaser (station-locked) crate"
contains = list(
/obj/item/weapon/gun/energy/frontier/locked = 2,
)
cost = 35
containertype = /obj/structure/closet/crate/secure
containername = "frontier phaser crate"
access = access_explorer
@@ -778,3 +778,86 @@
name = "speedloader (.44 rubber)"
icon_state = "r357"
ammo_type = /obj/item/ammo_casing/a44/rubber
//Expedition pistol
/obj/item/weapon/gun/energy/frontier
name = "frontier phaser"
desc = "An extraordinarily rugged laser weapon, built to last and requiring effectively no maintenance. Includes a built-in crank charger for recharging away from civilization."
icon = 'icons/obj/gun_vr.dmi'
icon_state = "phaser"
item_state = "phaser"
item_icons = list(slot_l_hand_str = 'icons/mob/items/lefthand_guns_vr.dmi', slot_r_hand_str = 'icons/mob/items/righthand_guns_vr.dmi', "slot_belt" = 'icons/mob/belt_vr.dmi')
item_state_slots = list(slot_r_hand_str = "phaser", slot_l_hand_str = "phaser", "slot_belt" = "phaser")
fire_sound = 'sound/weapons/laser2.ogg'
origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 2, TECH_POWER = 4)
battery_lock = 1
unacidable = 1
var/recharging = 0
projectile_type = /obj/item/projectile/beam
firemodes = list(
list(mode_name="normal", fire_delay=12, projectile_type=/obj/item/projectile/beam, charge_cost = 300),
list(mode_name="low-power", fire_delay=8, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60),
)
/obj/item/weapon/gun/energy/frontier/unload_ammo(var/mob/user)
if(recharging)
return
recharging = 1
update_icon()
user.visible_message("<span class='notice'>[user] opens \the [src] and starts pumping the handle.</span>", \
"<span class='notice'>You open \the [src] and start pumping the handle.</span>")
while(recharging)
if(!do_after(user, 10, src))
break
playsound(get_turf(src),'sound/items/change_drill.ogg',25,1)
if(power_supply.give(60) < 60)
break
recharging = 0
update_icon()
/obj/item/weapon/gun/energy/frontier/update_icon()
if(recharging)
icon_state = "[initial(icon_state)]_pump"
update_held_icon()
return
..()
/obj/item/weapon/gun/energy/frontier/emp_act(severity)
return ..(severity+2)
/obj/item/weapon/gun/energy/frontier/ex_act() //|rugged|
return
/obj/item/weapon/gun/energy/frontier/locked
desc = "An extraordinarily rugged laser weapon, built to last and requiring effectively no maintenance. Includes a built-in crank charger for recharging away from civilization. This one has a safety interlock that prevents firing while in proximity to the facility."
req_access = list(access_armory) //for toggling safety
var/locked = 1
/obj/item/weapon/gun/energy/frontier/locked/attackby(obj/item/I, mob/user)
var/obj/item/weapon/card/id/id = I.GetID()
if(istype(id))
if(check_access(id))
locked = !locked
to_chat(user, "<span class='warning'>You [locked ? "enable" : "disable"] the safety lock on \the [src].</span>")
else
to_chat(user, "<span class='warning'>Access denied.</span>")
user.visible_message("<span class='notice'>[user] swipes \the [I] against \the [src].</span>")
else
return ..()
/obj/item/weapon/gun/energy/frontier/locked/emag_act(var/remaining_charges,var/mob/user)
..()
locked = !locked
to_chat(user, "<span class='warning'>You [locked ? "enable" : "disable"] the safety lock on \the [src]!</span>")
/obj/item/weapon/gun/energy/frontier/locked/special_check(mob/user)
if(locked)
var/turf/T = get_turf(src)
if(T.z in using_map.map_levels)
to_chat(user, "<span class='warning'>The safety device prevents the gun from firing this close to the facility.</span>")
return 0
return ..()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

+17 -3
View File
@@ -21629,6 +21629,20 @@
},
/turf/simulated/shuttle/wall/voidcraft,
/area/shuttle/excursion/tether)
"RIb" = (
/obj/effect/floor_decal/steeldecal/steel_decals9,
/obj/effect/floor_decal/steeldecal/steel_decals9{
dir = 4
},
/obj/effect/floor_decal/steeldecal/steel_decals9{
dir = 8
},
/obj/effect/floor_decal/steeldecal/steel_decals9{
dir = 1
},
/obj/structure/closet/secure_closet/guncabinet/excursion,
/turf/simulated/floor/tiled/monotile,
/area/tether/station/explorer_prep)
"PYd" = (
/obj/machinery/atmospherics/pipe/simple/visible/cyan{
dir = 10
@@ -32436,7 +32450,7 @@ aiv
bQJ
bQT
bQJ
aiv
bQJ
aiv
aac
aac
@@ -32558,6 +32572,7 @@ aiv
bQK
bQK
bQK
RIb
aiv
aac
aac
@@ -32565,7 +32580,6 @@ aac
aac
aac
aac
aac
alA
amg
amg
@@ -32681,7 +32695,7 @@ aiv
aiv
aiv
aiv
aac
aiv
aac
aac
aac
+9
View File
@@ -362,6 +362,15 @@ var/global/list/latejoin_tram = list()
return ..(user)
/obj/structure/closet/secure_closet/guncabinet/excursion
name = "expedition weaponry cabinet"
req_one_access = list(access_explorer,access_brig)
/obj/structure/closet/secure_closet/guncabinet/excursion/New()
..()
for(var/i = 1 to 4)
new /obj/item/weapon/gun/energy/frontier/locked(src)
//
// ### Wall Machines On Full Windows ###
// To make sure wall-mounted machines placed on full-tile windows are clickable they must be above the window