Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Lasergun & Riotshotgun flashlights. #6074

Open
wants to merge 19 commits into
base: master220
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
origin_tech = null
can_charge = FALSE
selfcharge = TRUE // Selfcharge is enabled and disabled, and used as the away mission tracker
can_flashlight = FALSE

/obj/item/gun/energy/laser/awaymission_aeg/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents = FALSE)
if(is_away_level(new_turf?.z))
Expand Down
1 change: 1 addition & 0 deletions code/modules/awaymissions/mission_code/stationCollision.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
name = "Old laser"
desc = "A once potent weapon, years of dust have collected in the chamber and lens of this weapon, weakening the beam significantly."
clumsy_check = 0
can_flashlight = FALSE

/*
* Safe code hints
Expand Down
17 changes: 17 additions & 0 deletions code/modules/projectiles/guns/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
icon_state = "lasergun"
item_state = null
w_class = WEIGHT_CLASS_NORMAL
can_flashlight = TRUE
lolybomb marked this conversation as resolved.
Show resolved Hide resolved
materials = list(MAT_METAL=2000)
origin_tech = "combat=4;magnets=2"
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
ammo_x_offset = 1
gun_light_overlay = "lasergun_light"
shaded_charge = TRUE

/obj/item/gun/energy/laser/ui_action_click(mob/user, datum/action/action, leftclick)
if(istype(action, /datum/action/item_action/toggle_gunlight))
toggle_gunlight()
return TRUE

/obj/item/gun/energy/laser/practice
name = "practice laser gun"
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
Expand All @@ -19,12 +26,14 @@
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
clumsy_check = 0
needs_permit = 0
can_flashlight = FALSE

/obj/item/gun/energy/laser/retro
name ="retro laser gun"
icon_state = "retro"
item_state = "laser"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
can_flashlight = FALSE
ammo_x_offset = 3

/obj/item/gun/energy/laser/captain
Expand All @@ -34,6 +43,7 @@
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 10
origin_tech = null
can_flashlight = FALSE
ammo_x_offset = 3
selfcharge = TRUE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
Expand All @@ -52,6 +62,7 @@
item_state = "laser"
desc = "An industrial-grade heavy-duty laser rifle with a modified laser lense to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theorically infinite use."
origin_tech = "combat=5;materials=4;powerstorage=4"
can_flashlight = FALSE
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
shaded_charge = FALSE
unique_reskin = FALSE
Expand All @@ -61,6 +72,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/laser/cyborg)
can_charge = FALSE
origin_tech = null
can_flashlight = FALSE

/obj/item/gun/energy/laser/cyborg/newshot()
..()
Expand All @@ -73,6 +85,7 @@
name = "scatter laser gun"
desc = "A laser gun equipped with a refraction kit that spreads bolts."
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
can_flashlight = FALSE

///Laser Cannon

Expand All @@ -82,6 +95,7 @@
icon_state = "lasercannon"
item_state = "laser"
w_class = WEIGHT_CLASS_BULKY
can_flashlight = FALSE
force = 10
flags = CONDUCT
slot_flags = ITEM_SLOT_BACK
Expand Down Expand Up @@ -119,6 +133,7 @@
desc = "A high-power laser gun capable of expelling concentrated xray blasts. These blasts will penetrate solid objects, but will decrease in power the longer they have to travel."
icon_state = "xray"
origin_tech = "combat=6;materials=4;magnets=4"
can_flashlight = FALSE
ammo_type = list(/obj/item/ammo_casing/energy/xray)

/obj/item/gun/energy/immolator
Expand All @@ -127,6 +142,7 @@
icon_state = "immolator"
item_state = "laser"
ammo_type = list(/obj/item/ammo_casing/energy/immolator)
can_flashlight = FALSE
origin_tech = "combat=4;magnets=4;powerstorage=3"
shaded_charge = TRUE

Expand Down Expand Up @@ -158,6 +174,7 @@
name = "laser tag gun"
desc = "Standard issue weapon of the Imperial Guard"
origin_tech = "combat=2;magnets=2"
can_flashlight = FALSE
clumsy_check = FALSE
needs_permit = FALSE
ammo_x_offset = 2
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/instakill)
force = 60
origin_tech = "combat=7;magnets=6"
can_flashlight = FALSE

/obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
return
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/mounted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
item_state = "armcannonlase"
selfcharge = TRUE
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
can_flashlight = FALSE
15 changes: 15 additions & 0 deletions code/modules/projectiles/guns/projectile/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,24 @@
desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control."
icon_state = "riotshotgun"
mag_type = /obj/item/ammo_box/magazine/internal/shot/riot
can_flashlight = TRUE
sawn_desc = "Come with me if you want to live."
sawn_state = SAWN_INTACT
fire_sound = 'sound/weapons/gunshots/1shotgun.ogg'
gun_light_overlay = "riotshotgun_light"

/obj/item/gun/projectile/shotgun/riot/update_overlays()
. = ..()
if(gun_light && gun_light_overlay)
var/iconF = gun_light_overlay
if(gun_light.on)
iconF = "[gun_light_overlay]_on"
. += image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset)

/obj/item/gun/projectile/shotgun/riot/ui_action_click(mob/user, datum/action/action, leftclick)
if(istype(action, /datum/action/item_action/toggle_gunlight))
toggle_gunlight()
return TRUE


/obj/item/gun/projectile/shotgun/riot/attackby(obj/item/I, mob/user, params)
Expand Down
Binary file modified icons/obj/weapons/energy.dmi
Binary file not shown.
Binary file modified icons/obj/weapons/projectile.dmi
Binary file not shown.
14 changes: 7 additions & 7 deletions paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@
#include "code\datums\diseases\appendicitis.dm"
#include "code\datums\diseases\berserker.dm"
#include "code\datums\diseases\critical.dm"
#include "code\datums\diseases\ectoplasmic.dm"
#include "code\datums\diseases\food_poisoning.dm"
#include "code\datums\diseases\kuru.dm"
#include "code\datums\diseases\vampire.dm"
#include "code\datums\diseases\ectoplasmic.dm"
#include "code\datums\diseases\viruses\_virus.dm"
#include "code\datums\diseases\viruses\anxiety.dm"
#include "code\datums\diseases\viruses\babylon_fever.dm"
Expand Down Expand Up @@ -1576,6 +1576,12 @@
#include "code\modules\antagonists\blob\blob_actions.dm"
#include "code\modules\antagonists\blob\blob_infected_datum.dm"
#include "code\modules\antagonists\blob\blob_overmind_datum.dm"
#include "code\modules\antagonists\borer\borer_action.dm"
#include "code\modules\antagonists\borer\borer_datum.dm"
#include "code\modules\antagonists\borer\borer_focus.dm"
#include "code\modules\antagonists\borer\borer_rank.dm"
#include "code\modules\antagonists\borer\borer_reagent.dm"
#include "code\modules\antagonists\borer\borer_spell.dm"
#include "code\modules\antagonists\changeling\changeling_datum.dm"
#include "code\modules\antagonists\changeling\changeling_power.dm"
#include "code\modules\antagonists\changeling\evolution_menu.dm"
Expand All @@ -1602,12 +1608,6 @@
#include "code\modules\antagonists\changeling\powers\swap_form.dm"
#include "code\modules\antagonists\changeling\powers\tiny_prick.dm"
#include "code\modules\antagonists\changeling\powers\transform.dm"
#include "code\modules\antagonists\borer\borer_datum.dm"
#include "code\modules\antagonists\borer\borer_rank.dm"
#include "code\modules\antagonists\borer\borer_focus.dm"
#include "code\modules\antagonists\borer\borer_reagent.dm"
#include "code\modules\antagonists\borer\borer_action.dm"
#include "code\modules\antagonists\borer\borer_spell.dm"
#include "code\modules\antagonists\malf_ai\malf_ai_datum.dm"
#include "code\modules\antagonists\space_dragon\action.dm"
#include "code\modules\antagonists\space_dragon\carp.dm"
Expand Down