mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-28 02:21:53 +00:00
* Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit (#52995) Made a few changes to gunpoints and some related mechanics while tidying up and adding docs. Here's a quick list -Execution (point blank help intent shot aimed at the mouth) and gunpoint shots now apply their bonuses to every pellet fired rather than only the first, generally making them gushier. They also buff wound power as well as damage -You can no longer punch yourself while holding someone up to trigger the charged shot -You can no longer purposely fail executions and gunpoints with pax or whatever to endlessly spike the damage in a loaded round -Attacks with extremely high wounding power can now outright dismember limbs regardless of mangled status. The threshold is high enough that it mostly applies for admin edited weapons or execution shots with shotguns (or people with the frail quirk!) -Piercing wounds make further wounds a bit easier to apply to give them a bit more power -Hellguns now cost 2250 credits instead of 2000 to make them a bit harder for random crew to get -Adds special bouncy L6 rounds for admins to use to bounce off anything and everything en-masse Also as a minor note Projectiles with no trajectory (meaning they were likely spawned in manually) now qdel themselves on bumping something, rather than runtiming helplessly * Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
135 lines
4.0 KiB
Plaintext
135 lines
4.0 KiB
Plaintext
/obj/structure
|
|
icon = 'icons/obj/structures.dmi'
|
|
pressure_resistance = 8
|
|
max_integrity = 300
|
|
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
|
|
layer = BELOW_OBJ_LAYER
|
|
flags_ricochet = RICOCHET_HARD
|
|
receive_ricochet_chance_mod = 0.6
|
|
|
|
var/climb_time = 20
|
|
var/climb_stun = 20
|
|
var/climbable = FALSE
|
|
var/mob/living/structureclimber
|
|
var/broken = 0 //similar to machinery's stat BROKEN
|
|
|
|
|
|
/obj/structure/Initialize()
|
|
if (!armor)
|
|
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
|
|
. = ..()
|
|
if(smoothing_flags)
|
|
QUEUE_SMOOTH(src)
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
icon_state = ""
|
|
GLOB.cameranet.updateVisibility(src)
|
|
|
|
/obj/structure/Destroy()
|
|
GLOB.cameranet.updateVisibility(src)
|
|
if(smoothing_flags)
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
return ..()
|
|
|
|
/obj/structure/attack_hand(mob/user)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
if(structureclimber && structureclimber != user)
|
|
user.changeNext_move(CLICK_CD_MELEE)
|
|
user.do_attack_animation(src)
|
|
structureclimber.Paralyze(40)
|
|
structureclimber.visible_message("<span class='warning'>[structureclimber] is knocked off [src].</span>", "<span class='warning'>You're knocked off [src]!</span>", "<span class='warning'>You see [structureclimber] get knocked off [src].</span>")
|
|
|
|
/obj/structure/ui_act(action, params)
|
|
. = ..()
|
|
add_fingerprint(usr)
|
|
|
|
/obj/structure/MouseDrop_T(atom/movable/O, mob/user)
|
|
. = ..()
|
|
if(!climbable)
|
|
return
|
|
if(user == O && isliving(O))
|
|
var/mob/living/L = O
|
|
if(isanimal(L))
|
|
var/mob/living/simple_animal/A = L
|
|
if (!A.dextrous)
|
|
return
|
|
if(L.mobility_flags & MOBILITY_MOVE)
|
|
climb_structure(user)
|
|
return
|
|
if(!istype(O, /obj/item) || user.get_active_held_item() != O)
|
|
return
|
|
if(iscyborg(user))
|
|
return
|
|
if(!user.dropItemToGround(O))
|
|
return
|
|
if (O.loc != src.loc)
|
|
step(O, get_dir(O, src))
|
|
|
|
/obj/structure/proc/do_climb(atom/movable/A)
|
|
if(climbable)
|
|
if(A.loc == src.loc)
|
|
var/turf/where_to_climb = get_step(A,dir)
|
|
if(!where_to_climb.is_blocked_turf())
|
|
A.forceMove(where_to_climb)
|
|
return TRUE
|
|
density = FALSE
|
|
. = step(A,get_dir(A,src.loc))
|
|
density = TRUE
|
|
|
|
/obj/structure/proc/climb_structure(mob/living/user)
|
|
src.add_fingerprint(user)
|
|
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
|
|
"<span class='notice'>You start climbing onto [src]...</span>")
|
|
var/adjusted_climb_time = climb_time
|
|
if(user.restrained()) //climbing takes twice as long when restrained.
|
|
adjusted_climb_time *= 2
|
|
if(isalien(user))
|
|
adjusted_climb_time *= 0.25 //aliens are terrifyingly fast
|
|
if(HAS_TRAIT(user, TRAIT_FREERUNNING)) //do you have any idea how fast I am???
|
|
adjusted_climb_time *= 0.8
|
|
structureclimber = user
|
|
if(do_mob(user, user, adjusted_climb_time))
|
|
if(src.loc) //Checking if structure has been destroyed
|
|
if(do_climb(user))
|
|
user.visible_message("<span class='warning'>[user] climbs onto [src].</span>", \
|
|
"<span class='notice'>You climb onto [src].</span>")
|
|
log_combat(user, src, "climbed onto")
|
|
if(climb_stun)
|
|
user.Stun(climb_stun)
|
|
. = 1
|
|
else
|
|
to_chat(user, "<span class='warning'>You fail to climb onto [src].</span>")
|
|
structureclimber = null
|
|
|
|
/obj/structure/examine(mob/user)
|
|
. = ..()
|
|
if(!(resistance_flags & INDESTRUCTIBLE))
|
|
if(resistance_flags & ON_FIRE)
|
|
. += "<span class='warning'>It's on fire!</span>"
|
|
if(broken)
|
|
. += "<span class='notice'>It appears to be broken.</span>"
|
|
var/examine_status = examine_status(user)
|
|
if(examine_status)
|
|
. += examine_status
|
|
|
|
/obj/structure/CanAllowThrough(atom/movable/mover, turf/target)
|
|
. = ..()
|
|
|
|
if(mover.pass_flags & PASSSTRUCTURE)
|
|
return TRUE
|
|
|
|
/obj/structure/proc/examine_status(mob/user) //An overridable proc, mostly for falsewalls.
|
|
var/healthpercent = (obj_integrity/max_integrity) * 100
|
|
switch(healthpercent)
|
|
if(50 to 99)
|
|
return "It looks slightly damaged."
|
|
if(25 to 50)
|
|
return "It appears heavily damaged."
|
|
if(0 to 25)
|
|
if(!broken)
|
|
return "<span class='warning'>It's falling apart!</span>"
|
|
|
|
/obj/structure/rust_heretic_act()
|
|
take_damage(500, BRUTE, MELEE, 1)
|