mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-06 23:51:43 +00:00
Completely reworks the plasma pistol, adds the dropwall shield generator (Serious) (#17556)
* oi you got a loicnse for that * Final touches on plasma bar sound/sprite, hot drops hot drop walls * Actually makes dropwalls good™️ * s p r i t e s and fixes * Gives vox / drask hand gun sprites * forgot cult shield, ICONS added with pain * Last minute fixes and deploy coder sprites * spacing Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * Removes comments, improves deployment and sprite handling * Removes direction_check * Uses signals, various changes * Final™️ changes * Final™️ Final™️ Changes * Final™️ Final™️ Final™️ Changes * [insert final™️ x4 joke here] * Final™️ Change. *6 Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
@@ -633,6 +633,10 @@
|
||||
current_charges--
|
||||
if(recharge_rate)
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(istype(hitby, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(P.shield_buster)
|
||||
current_charges = max(0, current_charges - 3)
|
||||
if(current_charges <= 0)
|
||||
owner.visible_message("<span class='warning'>[owner]'s shield overloads!</span>")
|
||||
shield_state = "broken"
|
||||
|
||||
@@ -196,6 +196,7 @@
|
||||
H.update_icon()
|
||||
H = hud_used.inv_slots[slot_r_hand]
|
||||
H.update_icon()
|
||||
SEND_SIGNAL(src, COMSIG_CARBON_SWAP_HANDS)
|
||||
|
||||
|
||||
/mob/living/carbon/activate_hand(selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.
|
||||
|
||||
@@ -245,11 +245,19 @@
|
||||
muzzle_flash_color = LIGHT_COLOR_FADEDPURPLE
|
||||
projectile_type = /obj/item/projectile/energy/shock_revolver
|
||||
|
||||
/obj/item/ammo_casing/energy/toxplasma
|
||||
projectile_type = /obj/item/projectile/energy/toxplasma
|
||||
/obj/item/ammo_casing/energy/weak_plasma
|
||||
projectile_type = /obj/item/projectile/energy/weak_plasma
|
||||
e_cost = 75 // With no charging, 162.5 damage from 13 shots.
|
||||
muzzle_flash_color = LIGHT_COLOR_FADEDPURPLE
|
||||
fire_sound = 'sound/weapons/taser2.ogg'
|
||||
select_name = "plasma dart"
|
||||
select_name = null //If the select name is null, it does not send a message of switching modes to the user, important on the pistol.
|
||||
|
||||
/obj/item/ammo_casing/energy/charged_plasma
|
||||
projectile_type = /obj/item/projectile/energy/charged_plasma
|
||||
e_cost = 0 //Charge is used when you charge the gun. Prevents issues.
|
||||
muzzle_flash_color = LIGHT_COLOR_FADEDPURPLE
|
||||
fire_sound = 'sound/weapons/marauder.ogg' //Should be different enough to get attention
|
||||
select_name = null
|
||||
|
||||
/obj/item/ammo_casing/energy/clown
|
||||
projectile_type = /obj/item/projectile/clown
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define PLASMA_CHARGE_USE_PER_SECOND 2.5
|
||||
#define PLASMA_DISCHARGE_LIMIT 5
|
||||
|
||||
// Ion Rifles //
|
||||
/obj/item/gun/energy/ionrifle
|
||||
name = "ion rifle"
|
||||
@@ -303,17 +306,142 @@
|
||||
ammo_x_offset = 3
|
||||
can_holster = TRUE // you'll never see it coming
|
||||
|
||||
/obj/item/gun/energy/toxgun
|
||||
/obj/item/gun/energy/plasma_pistol
|
||||
name = "plasma pistol"
|
||||
desc = "A specialized firearm designed to fire lethal bolts of toxins."
|
||||
desc = "A specialized firearm designed to fire heated bolts of plasma. Can be overloaded for a high damage shield breaking shot."
|
||||
icon_state = "toxgun"
|
||||
fire_sound = 'sound/effects/stealthoff.ogg'
|
||||
|
||||
item_state = "toxgun"
|
||||
sprite_sheets_inhand = list("Vox" = 'icons/mob/clothing/species/vox/held.dmi', "Drask" = 'icons/mob/clothing/species/drask/held.dmi') //This apperently exists, and I have the sprites so sure.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/toxplasma)
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/weak_plasma, /obj/item/ammo_casing/energy/charged_plasma)
|
||||
shaded_charge = 1
|
||||
can_holster = TRUE
|
||||
atom_say_verb = "beeps"
|
||||
bubble_icon = "swarmer"
|
||||
light_color = "#89078E"
|
||||
light_power = 4
|
||||
var/overloaded = FALSE
|
||||
var/warned = FALSE
|
||||
var/charging = FALSE
|
||||
var/mob/living/carbon/holder = null
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
holder = null
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/process()
|
||||
..()
|
||||
if(overloaded)
|
||||
cell.charge -= PLASMA_CHARGE_USE_PER_SECOND / 5 //2.5 per second, 25 every 10 seconds
|
||||
if(cell.charge <= PLASMA_CHARGE_USE_PER_SECOND * 10 && !warned)
|
||||
warned = TRUE
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 75, 1)
|
||||
atom_say("Caution, charge low. Forced discharge in under 10 seconds.")
|
||||
if(cell.charge <= PLASMA_DISCHARGE_LIMIT)
|
||||
discharge()
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/attack_self(mob/living/user)
|
||||
if(overloaded)
|
||||
to_chat(user, "<span class='warning'>[src] is already overloaded!</span>")
|
||||
return
|
||||
if(cell.charge <= 140) //at least 6 seconds of charge time
|
||||
to_chat(user, "<span class='warning'>[src] does not have enough charge to be overloaded.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin to overload [src].</span>")
|
||||
charging = TRUE
|
||||
if(do_after(user, 2.5 SECONDS, target = src))
|
||||
select_fire(user)
|
||||
overloaded = TRUE
|
||||
cell.charge -= 125
|
||||
playsound(loc, 'sound/machines/terminal_prompt_confirm.ogg', 75, 1)
|
||||
atom_say("Overloading successful.")
|
||||
set_light(3) //extra visual effect to make it more noticable to user and victims alike
|
||||
holder = user
|
||||
RegisterSignal(holder, COMSIG_CARBON_SWAP_HANDS, .proc/discharge)
|
||||
charging = FALSE
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/proc/reset_overloaded()
|
||||
select_fire()
|
||||
set_light(0)
|
||||
overloaded = FALSE
|
||||
warned = FALSE
|
||||
UnregisterSignal(holder, COMSIG_CARBON_SWAP_HANDS)
|
||||
holder = null
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/process_fire(atom/target, mob/living/user, message = TRUE, params, zone_override, bonus_spread = 0)
|
||||
if(charging)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/process_chamber()
|
||||
if(overloaded)
|
||||
do_sparks(2, 1, src)
|
||||
reset_overloaded()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/emp_act(severity)
|
||||
..()
|
||||
if(prob(100 / severity) && overloaded)
|
||||
discharge()
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/dropped(mob/user)
|
||||
. = ..()
|
||||
if(overloaded)
|
||||
discharge()
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
if(overloaded)
|
||||
discharge()
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/proc/discharge() //25% of the time, plasma leak. Otherwise, shoot at a random mob / turf nearby. If no proper mob is found when mob is picked, fire at a turf instead
|
||||
SIGNAL_HANDLER
|
||||
reset_overloaded()
|
||||
do_sparks(2, 1, src)
|
||||
update_icon()
|
||||
if(prob(25))
|
||||
visible_message("<span class='danger'>[src] vents heated plasma!</span>")
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(istype(T))
|
||||
T.atmos_spawn_air(LINDA_SPAWN_TOXINS|LINDA_SPAWN_20C,15)
|
||||
return
|
||||
if(prob(50))
|
||||
var/list/mob_targets = list()
|
||||
for(var/mob/living/M in oview(get_turf(src), 7))
|
||||
mob_targets += M
|
||||
if(length(mob_targets))
|
||||
var/mob/living/target = pick(mob_targets)
|
||||
shootAt(target)
|
||||
visible_message("<span class='danger'>[src] discharges a plasma bolt!</span>")
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>[src] discharges a plasma bolt!</span>")
|
||||
var/list/turf_targets = list()
|
||||
for(var/turf/T in orange(get_turf(src), 7))
|
||||
turf_targets += T
|
||||
if(length(turf_targets))
|
||||
var/turf/target = pick(turf_targets)
|
||||
shootAt(target)
|
||||
|
||||
|
||||
/obj/item/gun/energy/plasma_pistol/proc/shootAt(atom/movable/target)
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/U = get_turf(target)
|
||||
if(!T || !U)
|
||||
return
|
||||
var/obj/item/projectile/energy/charged_plasma/O = new /obj/item/projectile/energy/charged_plasma(T)
|
||||
playsound(get_turf(src), 'sound/weapons/marauder.ogg', 75, 1)
|
||||
O.current = T
|
||||
O.yo = U.y - T.y
|
||||
O.xo = U.x - T.x
|
||||
O.fire()
|
||||
|
||||
/obj/item/gun/energy/bsg
|
||||
name = "\improper B.S.G"
|
||||
@@ -628,3 +756,6 @@
|
||||
var/obj/item/ammo_casing/energy/mimic/M = ammo_type[select]
|
||||
M.mimic_type = mimic_type
|
||||
..()
|
||||
|
||||
#undef PLASMA_CHARGE_USE_PER_SECOND
|
||||
#undef PLASMA_DISCHARGE_LIMIT
|
||||
|
||||
@@ -72,6 +72,9 @@
|
||||
/// Instructs forceMove to NOT reset our trajectory to the new location!
|
||||
var/trajectory_ignore_forcemove = FALSE
|
||||
|
||||
/// Does this projectile do extra damage to / break shields?
|
||||
var/shield_buster = FALSE
|
||||
|
||||
/obj/item/projectile/New()
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -134,9 +134,17 @@
|
||||
add_attack_logs(src, M, "Hit lightly by [src]")
|
||||
M.apply_damage(rand(1, 5), BURN)
|
||||
|
||||
/obj/item/projectile/energy/toxplasma
|
||||
/obj/item/projectile/energy/weak_plasma
|
||||
name = "plasma bolt"
|
||||
icon_state = "energy"
|
||||
damage = 20
|
||||
damage_type = TOX
|
||||
irradiate = 20
|
||||
icon_state = "plasma_light"
|
||||
damage = 12.5
|
||||
damage_type = BURN
|
||||
|
||||
/obj/item/projectile/energy/charged_plasma
|
||||
name = "charged plasma bolt"
|
||||
icon_state = "plasma_heavy"
|
||||
damage = 45
|
||||
damage_type = BURN
|
||||
armour_penetration = 10 // It can have a little armor pen, as a treat. Bigger than it looks, energy armor is often low.
|
||||
shield_buster = TRUE
|
||||
is_reflectable = FALSE //I will let eswords block it like a normal projectile, but it's not getting reflected, and eshields will take the hit hard.
|
||||
|
||||
@@ -133,12 +133,12 @@
|
||||
|
||||
/datum/design/plasmapistol
|
||||
name = "Plasma Pistol"
|
||||
desc = "A specialized firearm designed to fire lethal bolts of toxins."
|
||||
desc = "A specialized firearm designed to fire heated bolts of plasma. Can be charged up for a shield breaking shot."
|
||||
id = "ppistol"
|
||||
req_tech = list("combat" = 5, "magnets" = 5, "powerstorage" = 5)
|
||||
req_tech = list("combat" = 5, "magnets" = 5, "powerstorage" = 5, "plasmatech" = 5)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_PLASMA = 3000)
|
||||
build_path = /obj/item/gun/energy/toxgun
|
||||
build_path = /obj/item/gun/energy/plasma_pistol
|
||||
locked = 1
|
||||
category = list("Weapons")
|
||||
|
||||
@@ -280,3 +280,13 @@
|
||||
build_path = /obj/item/gun/energy/bsg
|
||||
locked = TRUE
|
||||
category = list("Weapons")
|
||||
|
||||
/datum/design/dropwall
|
||||
name = "Dropwall Generator"
|
||||
desc = "A prototype shield generator design that was inspired by shellguard munitions spartan division. Generates a directional shield to block projectiles and explosions."
|
||||
id = "drop_wall"
|
||||
req_tech = list("combat" = 5, "materials" = 5, "engineering" = 5, "magnets" = 5)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_GLASS = 5000, MAT_SILVER = 500, MAT_TITANIUM = 500, MAT_PLASMA = 500)
|
||||
build_path = /obj/item/grenade/barrier/dropwall
|
||||
category = list("Weapons")
|
||||
|
||||
Reference in New Issue
Block a user