mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 18:47:20 +01:00
* adds antaghud icon * TGUI bundle build dont push changes i didnt stage challenge 2025 (IMPOSSIBLE) * Adds organ repair passive * Description fix * Runs prettier * Fixes desc 2 * Fix revert * Remove vamp text * Fix some CI + Partial refactor * Fixes CI * Fixes gamemodes I messed with * Moves these procs over * Description fix again * Add back limit requiring drainees to have ckeys * Adds terminator icon * Update code/datums/status_effects/buffs.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/modules/surgery/organs/augments_internal.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/powers/flayer_stealth_powers.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * More lewv review * Clamps the EMP severity * Fixes "surveilance" typos * The TODO is gone and can't hurt me anymore * Update code/modules/antagonists/mind_flayer/flayer_datum.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/game/objects/items/weapons/pneumaticCannon.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/game/objects/items/weapons/stunbaton.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * More lewc reviews * Update code/modules/antagonists/_common/antag_datum.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/_common/antag_datum.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/flayer_datum.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/flayer_datum.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/flayer_datum.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/flayer_datum.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/flayer_power.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Fixes some camera bug issues + lewc reviews * Update code/modules/antagonists/mind_flayer/powers/flayer_passives.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/flayer_power.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Updates a comment and fixes whitespace * Autodocs flayerprod * Update code/modules/antagonists/mind_flayer/powers/flayer_mobility_powers.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * qdel things we dont need anymore + typing an argument of add_abillity * Remove debug log * Update code/modules/antagonists/mind_flayer/flayer_power.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * Slightly buffs, and fixes GC issues of tether * I no longer feel i am a mindflayer * Fixes formatting of greeting * Better greeting * Worlds shittiest sprite * Don't need this TODO anymore * Fixes double description * Changes the wording on the borg laws * and bundle too * The cannon uses shrapnel now * Initial style changes * Ratios for brain damage * Adds a chemical to test for flayerism * Fixes the brain damage ratios * Abilities are purchasable again * Updates TGUI properly * im sorry linter * Steam smoke * Hi bundle * Re-abstracts this proc post syndi orgs * Fixes gamemode logic post cling round removal * I WONT FORGET IT THIS TIME * Fix name of steam ability * I'm a fool * Fixes processed passives + removes debug message * Fixes updating abilities inside UI * Better description for quicksilver form * First part lewc review * Remove debug thingy * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Fixes defines + GCs weapon spells * We don't need this * Eyes GC properly * Update code/modules/antagonists/mind_flayer/powers/flayer_mobility_powers.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * adds better logging to the assimilate * Adds parenthesis Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> * TGUI Bundle Rebuild * Fixes and Reworks TGUI * Cleaner JS and Fixes * adds anti-snitching clause to borg laws * changes the span for the borg messages * No holoparasites * Puts baton silence in line with glare * Fixes total_swarms_gathered * Nuke old trait * Gun no longer not stuck * Rejuv clears delayed knockdown * Some weapon ability fixes * Makes radio enable timers not counterintuitive * Fixes beepsky runtimes * Makes naming more consistent * Adds one-click-antag * Adds the mind flayer toggle (doesn't technically work) * Adds flayers to check_antagonist * Gives IDs to the status effects * Also this one * Makes retracting work again if it's in your offhand * Fixes pacification tech levels * Grapple is a weapon ability now, nullifcation retracts implants * Fixed descriptions * Adds some pizzaz to torque enhancer * This actually needs to be like this * Moves a helper proc over to a helper proc file * Extra admin visibility * Nukes the wacky flayer mob * Makes silicon administrative access more sane * Terminator form better description * Makes rejuv set stamina to 0 * Various price increases * AAAAAAAAAAAAA * Better feedback + logging on cyborg subversion * Swarm purchase display (temp fix) * Makes mindflayer sounds more silent * UI improvements * Various mindflayer fixes * Typo * More fixes * Fixes innates from being stupid * Forgot to add this check earlier * Oh this is how you add things to the protolathe * Changes some description and upgrade messages * Allows you to drain people beyond your limit * Fixes some weapon upgrade issues * Fix CI * Fixes some draining issues * More UI Tweaks and QoL * Fixes most of the issues * text * Fixes * Adds a radio jamming option to intruder * Gives obfusciation to jammer ability * Small passive cleanup * Fixes Search and Adds Ability Stages to UI * Adds freebie abilities * Restructuring chain and adding blackbox * Tgui polish * Small fix for traceroute * Fixes one click antag * Increases EMP resistance cost * Changes the pneumatic cannon into a shotgun * Slightly lower static * Fixed innate building rendering in upgrades * Fixes icon and description * Consistency * Punctuation fix. * Quick reboot + terminator form synergy * Adds safety deleting * Fix level for torque * Fixes a bad bug * Update code/game/gamemodes/objective.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Aaaaaaaaaaa * Makes torque a martial art and some martial arts safeties * Replaces vortex arm with barrier * Fix paths * Adds torque knockdown * Part 1 lewc review * HIIIII SQUIDWARD I'M IN YOUR BRANCH NOW * Removes flak cannon * Flayer respects mindshielding now on vamp+cling * Fixes EMP resist * More fixes * DGL review * Contra review * Clean up weapon powers * Various tweaks * Borg hand slight improvements * Parent call needs to be after this * Fixes stuff * Adds a new proc that is called when a spell is purchased * NEW SPRITES WOOOO * Traceroute update * Slightly lower traceroute cost * Formatting * Oops * Wow this could've been bad * Overclock small buff * Reduces cost of 1st level EMP immunity * Lewc review * TGUI Bundle Rebuild * Fix barricades * Lewc review * Okay FINE qwerty I'll change this * Traceroute thingy * I am an idiot * First part * Lewc review * Forgor this one * Last bits * Update code/game/objects/items/control_wand.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/modules/antagonists/mind_flayer/powers/flayer_mobility_powers.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Null * Static-ness * Update code/game/gamemodes/changeling/traitor_chan.dm Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/__DEFINES/mindflayer_defines.dm Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Last bits --------- Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> Co-authored-by: DGamerL <daan.lyklema@gmail.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
183 lines
6.6 KiB
Plaintext
183 lines
6.6 KiB
Plaintext
/obj/item/pneumatic_cannon
|
|
name = "pneumatic cannon"
|
|
desc = "A gas-powered cannon that can fire any object loaded into it."
|
|
w_class = WEIGHT_CLASS_BULKY
|
|
force = 8 //Very heavy
|
|
attack_verb = list("bludgeoned", "smashed", "beaten")
|
|
icon = 'icons/obj/pneumaticCannon.dmi'
|
|
icon_state = "pneumaticCannon"
|
|
item_state = "bulldog"
|
|
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
|
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 60, ACID = 50)
|
|
///The max weight of items that can fit into the cannon
|
|
var/max_weight_class = 20
|
|
///The weight of items currently in the cannon
|
|
var/loaded_weight_class = 0
|
|
///The gas tank that is drawn from to fire things
|
|
var/obj/item/tank/internals/tank = null
|
|
///If the cannon needs a tank at all
|
|
var/requires_tank = TRUE
|
|
///How many moles of gas is drawn from a tank's pressure to fire
|
|
var/gas_per_throw = 3
|
|
///The items loaded into the cannon that will be fired out
|
|
var/list/loaded_items = list()
|
|
///How powerful the cannon is - higher pressure = more gas but more powerful throws
|
|
var/pressure_setting = 1
|
|
///In case we want a really strong cannon
|
|
var/max_pressure_setting = 3
|
|
|
|
/obj/item/pneumatic_cannon/Destroy()
|
|
QDEL_NULL(tank)
|
|
QDEL_LIST_CONTENTS(loaded_items)
|
|
return ..()
|
|
|
|
/obj/item/pneumatic_cannon/examine(mob/user)
|
|
. = ..()
|
|
if(!in_range(user, src))
|
|
. += "<span class='notice'>You'll need to get closer to see any more.</span>"
|
|
else
|
|
if(tank)
|
|
. += "<span class='notice'>[bicon(tank)] It has [tank] mounted onto it.</span>"
|
|
for(var/obj/item/I in loaded_items)
|
|
. += "<span class='notice'>[bicon(I)] It has [I] loaded.</span>"
|
|
|
|
/**
|
|
* Arguments:
|
|
* * I - item to load into the cannon
|
|
* * user - the person loading the item in
|
|
* * Returns:
|
|
* * True if item was loaded, false if it failed
|
|
*/
|
|
/obj/item/pneumatic_cannon/proc/load_item(obj/item/I, mob/user)
|
|
if((loaded_weight_class + I.w_class) > max_weight_class)
|
|
to_chat(user, "<span class='warning'>[I] won't fit into [src]!</span>")
|
|
return FALSE
|
|
if(I.w_class > w_class)
|
|
to_chat(user, "<span class='warning'>[I] is too large to fit into [src]!</span>")
|
|
return FALSE
|
|
if(!user.unEquip(I) || I.flags & (ABSTRACT | NODROP | DROPDEL))
|
|
to_chat(user, "<span class='warning'>You can't put [I] into [src]!</span>")
|
|
return FALSE
|
|
loaded_items.Add(I)
|
|
loaded_weight_class += I.w_class
|
|
I.forceMove(src)
|
|
return TRUE
|
|
|
|
/obj/item/pneumatic_cannon/wrench_act(mob/living/user, obj/item/I)
|
|
adjust_setting(user)
|
|
return TRUE
|
|
|
|
/obj/item/pneumatic_cannon/proc/adjust_setting(mob/living/user)
|
|
if(pressure_setting == max_pressure_setting)
|
|
pressure_setting = 1
|
|
else
|
|
pressure_setting++
|
|
to_chat(user, "<span class='notice'>You tweak [src]'s pressure output to [pressure_setting].</span>")
|
|
|
|
/obj/item/pneumatic_cannon/attackby(obj/item/W, mob/user, params)
|
|
..()
|
|
if(istype(W, /obj/item/tank/internals) && !tank)
|
|
if(istype(W, /obj/item/tank/internals/emergency_oxygen))
|
|
to_chat(user, "<span class='warning'>[W] is too small for [src].</span>")
|
|
return
|
|
add_tank(W, user)
|
|
return
|
|
if(W.type == type)
|
|
to_chat(user, "<span class='warning'>You're fairly certain that putting a pneumatic cannon inside another pneumatic cannon would cause a spacetime disruption.</span>")
|
|
return
|
|
load_item(W, user)
|
|
|
|
/obj/item/pneumatic_cannon/screwdriver_act(mob/living/user, obj/item/I)
|
|
remove_tank(user)
|
|
return TRUE
|
|
|
|
/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params)
|
|
if(isstorage(target)) //So you can store it in backpacks
|
|
return ..()
|
|
if(istype(target, /obj/structure/rack)) //So you can store it on racks
|
|
return ..()
|
|
if(!istype(user))
|
|
return ..()
|
|
fire(user, target)
|
|
|
|
|
|
/obj/item/pneumatic_cannon/proc/fire(mob/living/carbon/human/user, atom/target)
|
|
if(!istype(user) && !target)
|
|
return
|
|
var/has_discharged = FALSE
|
|
if(!loaded_items || !loaded_weight_class)
|
|
to_chat(user, "<span class='warning'>[src] has nothing loaded.</span>")
|
|
return
|
|
if(requires_tank)
|
|
if(!tank)
|
|
to_chat(user, "<span class='warning'>[src] can't fire without a source of gas.</span>")
|
|
return
|
|
if(!tank.air_contents.boolean_remove(gas_per_throw * pressure_setting))
|
|
to_chat(user, "<span class='warning'>[src] lets out a weak hiss and doesn't react!</span>")
|
|
return
|
|
if(user && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(75))
|
|
user.visible_message("<span class='warning'>[user] loses [user.p_their()] grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
|
|
user.drop_item()
|
|
has_discharged = TRUE
|
|
if(prob(10))
|
|
target = user
|
|
else
|
|
var/list/possible_targets = range(3,src)
|
|
target = pick(possible_targets)
|
|
if(!has_discharged)
|
|
user.visible_message("<span class='danger'>[user] fires [src]!</span>", \
|
|
"<span class='danger'>You fire [src]!</span>")
|
|
add_attack_logs(user, target, "Fired [src]")
|
|
playsound(loc, 'sound/weapons/sonic_jackhammer.ogg', 50, TRUE)
|
|
for(var/obj/item/loaded_item in loaded_items)
|
|
loaded_items.Remove(loaded_item)
|
|
loaded_weight_class -= loaded_item.w_class
|
|
loaded_item.throw_speed = pressure_setting * 2
|
|
loaded_item.forceMove(get_turf(src))
|
|
loaded_item.throw_at(target, pressure_setting * 5, pressure_setting * 2, user)
|
|
if(pressure_setting >= 3 && user)
|
|
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
|
user.KnockDown(3 SECONDS)
|
|
|
|
/obj/item/pneumatic_cannon/proc/add_tank(obj/item/tank/new_tank, mob/living/carbon/human/user)
|
|
if(tank)
|
|
to_chat(user, "<span class='warning'>[src] already has a tank.</span>")
|
|
return
|
|
if(!user.unEquip(new_tank))
|
|
return
|
|
to_chat(user, "<span class='notice'>You hook [new_tank] up to [src].</span>")
|
|
new_tank.forceMove(src)
|
|
tank = new_tank
|
|
update_icons()
|
|
|
|
/obj/item/pneumatic_cannon/proc/remove_tank(mob/living/carbon/human/user)
|
|
if(!tank)
|
|
return FALSE
|
|
to_chat(user, "<span class='notice'>You detach [tank] from [src].</span>")
|
|
user.put_in_hands(tank)
|
|
tank = null
|
|
update_icons()
|
|
|
|
/obj/item/pneumatic_cannon/proc/update_icons()
|
|
src.overlays.Cut()
|
|
if(!tank)
|
|
return
|
|
src.overlays += image('icons/obj/pneumaticCannon.dmi', "[tank.icon_state]")
|
|
src.update_icon()
|
|
|
|
/obj/item/pneumatic_cannon/admin
|
|
name = "admin pnuematic cannon"
|
|
desc = "Infinite gas and infinite capacity, go crazy."
|
|
requires_tank = FALSE
|
|
max_weight_class = INFINITY
|
|
|
|
/// Obtainable by improvised methods; more gas per use, less capacity, but smaller
|
|
/obj/item/pneumatic_cannon/ghetto
|
|
name = "improvised pneumatic cannon"
|
|
desc = "A gas-powered, object-firing cannon made out of common parts."
|
|
force = 5
|
|
w_class = WEIGHT_CLASS_NORMAL
|
|
max_weight_class = 7
|
|
gas_per_throw = 5
|