mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Adds the SPRK-12 Energy Pistol (#24869)
* Adds the SPRK-12 Pistol * I Was improper and forgot to name it right Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * check it * Update gun.dm * less copypasta * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> * early return --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
This commit is contained in:
co-authored by
Luc
Henri215
warriorstar-orion
parent
fb027f73dd
commit
a50683ef28
@@ -93,6 +93,12 @@
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
outcome = /obj/item/gun/energy/plasma_pistol
|
||||
|
||||
/obj/item/weaponcrafting/gunkit/sparker
|
||||
name = "\improper SPRK-12 pistol parts kit"
|
||||
desc = "A suitcase containing the necessary gun parts to transform a mini energy gun into a SPRK-12 pistol. Double or nothing!"
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
outcome = /obj/item/gun/energy/sparker
|
||||
|
||||
/obj/item/weaponcrafting/gunkit/u_ionsilencer
|
||||
name = "u-ion silencer parts kit"
|
||||
desc = "A suitcase containing the necessary gun parts to transform a standard disabler into a silenced and lethal disabling weapon. Look officer, he has no wounds from me!"
|
||||
@@ -114,13 +120,21 @@
|
||||
if(!gunkit_to_use.outcome)
|
||||
to_chat(user, "<span class='warning'>That gunkit can not be used to craft a weapon.</span>")
|
||||
return
|
||||
|
||||
playsound(user, 'sound/items/drill_use.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE)
|
||||
if(!do_after(user, 5 SECONDS, target = user))
|
||||
return
|
||||
playsound(user, 'sound/items/drill_use.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE)
|
||||
var/obj/item/gun_produced = new gunkit_to_use.outcome
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(gun_produced)
|
||||
if(istype(gunkit_to_use, /obj/item/weaponcrafting/gunkit/sparker)) //Snowflake checking, but I don't want a person with a self assembling kit to be robbed
|
||||
var/obj/item/gun_produceda = new gunkit_to_use.outcome
|
||||
var/obj/item/gun_producedb = new gunkit_to_use.outcome
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(gun_produceda)
|
||||
user.put_in_hands(gun_producedb)
|
||||
else
|
||||
var/obj/item/gun_produced = new gunkit_to_use.outcome
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(gun_produced)
|
||||
qdel(gunkit_to_use)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -221,6 +221,21 @@
|
||||
..()
|
||||
blacklist += subtypesof(/obj/item/gun/energy/laser)
|
||||
|
||||
/datum/crafting_recipe/sparker
|
||||
name = "SPRK-12 Pistol"
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
result = list(/obj/item/gun/energy/sparker)
|
||||
reqs = list(/obj/item/gun/energy/gun/mini = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weaponcrafting/gunkit/sparker = 1)
|
||||
time = 10 SECONDS
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/sparker/New()
|
||||
..()
|
||||
blacklist += subtypesof(/obj/item/gun/energy/gun/mini)
|
||||
|
||||
/datum/crafting_recipe/teslarevolver
|
||||
name = "Arc Revolver"
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
select_name = "anti-vehicle"
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/sparker
|
||||
projectile_type = /obj/item/projectile/beam/laser/sparker
|
||||
select_name = "spark"
|
||||
e_cost = (100 / 3) * 2 // 15 * 12.5 damage = 187.5 damage. Almost as much as a base laser gun, but takes longer to get all the shots out.
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/pulse
|
||||
projectile_type = /obj/item/projectile/beam/pulse/hitscan
|
||||
muzzle_flash_color = LIGHT_COLOR_DARKBLUE
|
||||
|
||||
@@ -195,19 +195,26 @@
|
||||
|
||||
//DUAL WIELDING
|
||||
var/bonus_spread = 0
|
||||
var/loop_counter = 0
|
||||
if(ishuman(user) && user.a_intent == INTENT_HARM)
|
||||
var/mob/living/carbon/human/H = user
|
||||
for(var/obj/item/gun/G in get_both_hands(H))
|
||||
if(G == src || G.weapon_weight >= WEAPON_MEDIUM)
|
||||
continue
|
||||
else if(G.can_trigger_gun(user))
|
||||
if(!HAS_TRAIT(user, TRAIT_BADASS))
|
||||
bonus_spread += dual_wield_spread * G.weapon_weight
|
||||
loop_counter++
|
||||
addtimer(CALLBACK(G, PROC_REF(process_fire), target, user, 1, params, null, bonus_spread), loop_counter)
|
||||
if(!(ishuman(user) && user.a_intent == INTENT_HARM))
|
||||
process_fire(target, user, TRUE, params, null, bonus_spread)
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/gun/GUN_1 = H.get_active_hand()
|
||||
if(istype(H.get_inactive_hand(), /obj/item/gun)) //We do not need to check gun one, as it is controlled by the afterattack
|
||||
var/obj/item/gun/GUN_2 = H.get_inactive_hand()
|
||||
|
||||
process_fire(target,user,1,params, null, bonus_spread)
|
||||
if(GUN_2.weapon_weight >= WEAPON_MEDIUM)
|
||||
process_fire(target, user, TRUE, params, null, bonus_spread)
|
||||
return
|
||||
if(GUN_2.can_trigger_gun(user))
|
||||
if(!HAS_TRAIT(user, TRAIT_BADASS))
|
||||
var/temporary_weapon_weight = GUN_2.weapon_weight
|
||||
if(GUN_1.type != GUN_2.type)
|
||||
temporary_weapon_weight = max(temporary_weapon_weight, WEAPON_LIGHT) //Can't hold the sparker in the off hand to make both guns perfectly accurate, must be 2 sparkers
|
||||
bonus_spread += dual_wield_spread * temporary_weapon_weight
|
||||
addtimer(CALLBACK(GUN_2, PROC_REF(process_fire), target, user, TRUE, params, null, bonus_spread), 1)
|
||||
|
||||
process_fire(target, user, TRUE, params, null, bonus_spread)
|
||||
|
||||
/obj/item/gun/proc/can_trigger_gun(mob/living/user)
|
||||
if(!user.can_use_guns(src))
|
||||
|
||||
@@ -980,3 +980,25 @@
|
||||
transform = M
|
||||
animate(src, transform = M * 10, time = 0.3 SECONDS, alpha = 0)
|
||||
QDEL_IN(src, 0.3 SECONDS)
|
||||
|
||||
/obj/item/gun/energy/sparker
|
||||
name = "\improper SPRK-12"
|
||||
desc = "A small, pistol-sized laser gun designed to regain charges from EMPs. Energy efficient, though its beams are weaker. Good at dual wielding, however."
|
||||
icon_state = "dueling_pistol"
|
||||
item_state = "dueling_pistol"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_holster = TRUE
|
||||
execution_speed = 4 SECONDS
|
||||
weapon_weight = WEAPON_DUAL_WIELD
|
||||
shaded_charge = TRUE
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/sparker)
|
||||
/// The cooldown tracking when we were last EMP'd
|
||||
COOLDOWN_DECLARE(emp_cooldown)
|
||||
|
||||
/obj/item/gun/energy/sparker/emp_act(severity)
|
||||
if(!COOLDOWN_FINISHED(src, emp_cooldown))
|
||||
return
|
||||
cell.charge = cell.maxcharge
|
||||
COOLDOWN_START(src, emp_cooldown, 1 MINUTES)
|
||||
atom_say("Energy coils recharged!")
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
@@ -336,3 +336,14 @@
|
||||
eyeblur = 0
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/item/projectile/beam/laser/sparker
|
||||
name = "sparker beam"
|
||||
icon_state = "scatterlaser"
|
||||
damage = 12.5
|
||||
range = 12
|
||||
|
||||
/obj/item/projectile/beam/laser/sparker/on_range()
|
||||
new /obj/effect/particle_effect/sparks(get_turf(src))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -145,6 +145,16 @@
|
||||
build_path = /obj/item/weaponcrafting/gunkit/plasma
|
||||
category = list("Weapons")
|
||||
|
||||
/datum/design/sparker
|
||||
name = "SPRK-12 Pistol Parts Kit"
|
||||
desc = "A small, pistol-sized laser gun designed to regain charges from EMPs. Energy efficient, though it's beams are weaker. Good at dual wielding, however."
|
||||
id = "sparker"
|
||||
req_tech = list("combat" = 5, "magnets" = 5, "powerstorage" = 5, "plasmatech" = 5)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 2500, MAT_GLASS = 1000, MAT_SILVER = 1500)
|
||||
build_path = /obj/item/weaponcrafting/gunkit/sparker
|
||||
category = list("Weapons")
|
||||
|
||||
//WT550 Mags
|
||||
/datum/design/mag_oldsmg
|
||||
name = "WT-550 PDW Magazine (4.6x30mm)"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 76 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Reference in New Issue
Block a user