mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-26 06:40:36 +01:00
Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into master
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
/datum/action/bloodsucker/targeted/brawn
|
||||
name = "Brawn"//"Cellular Emporium"
|
||||
name = "Brawn"
|
||||
desc = "Snap restraints with ease, or deal terrible damage with your bare hands."
|
||||
button_icon_state = "power_strength"
|
||||
bloodcost = 10
|
||||
@@ -107,8 +107,6 @@
|
||||
if(user_C.handcuffed)
|
||||
var/obj/O = user_C.get_item_by_slot(SLOT_HANDCUFFED)
|
||||
if(istype(O))
|
||||
//user_C.visible_message("<span class='warning'>[user_C] attempts to remove [O]!</span>", \
|
||||
// "<span class='warning'>You snap [O] like it's nothing!</span>")
|
||||
user_C.clear_cuffs(O,TRUE)
|
||||
playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1)
|
||||
return TRUE
|
||||
@@ -128,8 +126,6 @@
|
||||
if(user_C.legcuffed)
|
||||
var/obj/O = user_C.get_item_by_slot(SLOT_LEGCUFFED)
|
||||
if(istype(O))
|
||||
//user_C.visible_message("<span class='warning'>[user_C] attempts to remove [O]!</span>", \
|
||||
// "<span class='warning'>You snap [O] like it's nothing!</span>")
|
||||
user_C.clear_cuffs(O,TRUE)
|
||||
playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1)
|
||||
return TRUE
|
||||
|
||||
@@ -165,8 +165,8 @@
|
||||
// Broadcast Message
|
||||
if(amSilent)
|
||||
//if (!iscarbon(target))
|
||||
// user.visible_message("<span class='notice'>[user] shifts [target] closer to [user.p_their()] mouth.</span>", \
|
||||
// "<span class='notice'>You secretly slip your fangs into [target]'s flesh.</span>", \
|
||||
// user.visible_message("<span class='notice'>[user] shifts [target] closer to [user.p_their()] mouth.</span>",
|
||||
// "<span class='notice'>You secretly slip your fangs into [target]'s flesh.</span>",
|
||||
// vision_distance = 2, ignored_mobs=target) // Only people who AREN'T the target will notice this action.
|
||||
//else
|
||||
var/deadmessage = target.stat == DEAD ? "" : " <i>[target.p_they(TRUE)] looks dazed, and will not remember this.</i>"
|
||||
|
||||
@@ -1411,6 +1411,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
|
||||
|
||||
if(!affecting) //Maybe the bodypart is missing? Or things just went wrong..
|
||||
affecting = target.get_bodypart(BODY_ZONE_CHEST) //target chest instead, as failsafe. Or hugbox? You decide.
|
||||
|
||||
var/miss_chance = 100//calculate the odds that a punch misses entirely. considers stamina and brute damage of the puncher. punches miss by default to prevent weird cases
|
||||
if(attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)
|
||||
miss_chance = 0
|
||||
@@ -1626,6 +1629,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H, attackchain_flags = NONE, damage_multiplier = 1)
|
||||
var/totitemdamage = H.pre_attacked_by(I, user) * damage_multiplier
|
||||
|
||||
if(!affecting) //Something went wrong. Maybe the limb is missing?
|
||||
affecting = H.get_bodypart(BODY_ZONE_CHEST) //If the limb is missing, or something went terribly wrong, just hit the chest instead
|
||||
|
||||
// Allows you to put in item-specific reactions based on species
|
||||
if(user != H)
|
||||
var/list/block_return = list()
|
||||
@@ -1637,8 +1644,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
return 0
|
||||
|
||||
var/hit_area
|
||||
if(!affecting) //Something went wrong. Maybe the limb is missing?
|
||||
affecting = H.bodyparts[1]
|
||||
|
||||
hit_area = affecting.name
|
||||
var/def_zone = affecting.body_zone
|
||||
|
||||
@@ -162,6 +162,9 @@
|
||||
|
||||
/obj/machinery/ticket_machine/attack_hand(mob/living/carbon/user)
|
||||
. = ..()
|
||||
INVOKE_ASYNC(src, .proc/attempt_ticket, user)
|
||||
|
||||
/obj/machinery/ticket_machine/proc/attempt_ticket(mob/living/carbon/user)
|
||||
if(!ready)
|
||||
to_chat(user,"<span class='warning'>You press the button, but nothing happens...</span>")
|
||||
return
|
||||
@@ -195,7 +198,7 @@
|
||||
|
||||
/obj/item/ticket_machine_ticket
|
||||
name = "Ticket"
|
||||
desc = "A ticket which shows your place in the Head of Personnel's line. Made from Nanotrasen patented NanoPaper®. Though solid, its form seems to shimmer slightly. Feels (and burns) just like the real thing."
|
||||
desc = "A ticket which shows your place in the Head of Personnel's line. Made from Nanotrasen patented NanoPaper®. Though solid, its form seems to shimmer slightly. Feels (and burns) just like the real thing."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "ticket"
|
||||
maptext_x = 7
|
||||
|
||||
@@ -460,6 +460,7 @@
|
||||
return TRUE //Bullets don't drift in space
|
||||
|
||||
/obj/item/projectile/process(wait)
|
||||
set waitfor = FALSE
|
||||
if(!loc || !fired || !trajectory)
|
||||
fired = FALSE
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
for(var/obj/item/I in src_object)
|
||||
for(var/obj/item/I in src_object.contents())
|
||||
if(user.active_storage != src_object)
|
||||
if(I.on_found(user))
|
||||
return
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//////// HELPER FILE FOR SHIELDING /////////
|
||||
|
||||
// HULL SHIELD GENERATION HELPERS
|
||||
/**
|
||||
* Gets hull exterior adjacent tiles of a certain area
|
||||
* Area method.
|
||||
* EXPENSIVE.
|
||||
* If the area itself is already considered exterior, it'll find all tiles inside it that's next to an interior area.
|
||||
*/
|
||||
/proc/hull_shielding_get_tiles_around_area(area/instance, check_tick = FALSE)
|
||||
var/list/cache = list()
|
||||
var/area/A
|
||||
if(instance.considered_hull_exterior)
|
||||
for(var/turf/potential in instance)
|
||||
for(var/turf/looking in orange(1, potential))
|
||||
A = looking.loc
|
||||
if(!A.considered_hull_exterior)
|
||||
cache[potential] = TRUE // we're the exterior area, grab the one that's reaching out
|
||||
if(check_tick)
|
||||
CHECK_TICK
|
||||
else
|
||||
for(var/turf/potential in instance)
|
||||
for(var/turf/looking in orange(1, potential))
|
||||
A = looking.loc
|
||||
if(A.considered_hull_exterior)
|
||||
cache[looking] = TRUE // we're not the exterior area, grab the one that's being reached to
|
||||
if(check_tick)
|
||||
CHECK_TICK
|
||||
. = list()
|
||||
for(var/i in cache)
|
||||
. += i // strip assoc value
|
||||
|
||||
/**
|
||||
* Gets hull adjacent exterior tiles of an entire zlevel
|
||||
* EXPENSIVE.
|
||||
* Gets the tiles in the exterior area touching to a non-exterior area
|
||||
*/
|
||||
/proc/hull_shielding_get_tiles_in_z(zlevel, check_tick = FALSE, recurse = FALSE, list/outlist = list(), list/scanned_zlevels = list())
|
||||
. = outlist
|
||||
if(zlevel in scanned_zlevels)
|
||||
return
|
||||
scanned_zlevels |= zlevel
|
||||
if(recurse)
|
||||
var/up = SSmapping.level_trait(zlevel, ZTRAIT_UP)
|
||||
var/down = SSmapping.level_trait(zlevel, ZTRAIT_DOWN)
|
||||
if(isnum(up) && (up != 0))
|
||||
hull_shielding_get_tiles_in_z(up, check_tick, recurse, outlist, scanned_zlevels)
|
||||
if(isnum(down) && (down != 0))
|
||||
hull_shielding_get_tiles_in_z(down, check_tick, recurse, outlist, scanned_zlevels)
|
||||
// sigh. why.
|
||||
var/turf/potential
|
||||
var/area/p_area
|
||||
var/area/l_area
|
||||
for(var/x in 1 to world.maxx)
|
||||
for(var/y in 1 to world.maxy)
|
||||
if(check_tick)
|
||||
CHECK_TICK
|
||||
potential = locate(x, y, zlevel)
|
||||
p_area = potential.loc
|
||||
if(!p_area.considered_hull_exterior)
|
||||
continue
|
||||
for(var/turf/looking in orange(1, potential))
|
||||
l_area = looking.loc
|
||||
if(!l_area.considered_hull_exterior)
|
||||
outlist += potential
|
||||
Reference in New Issue
Block a user