mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Merge branch 'master' into placeholder
This commit is contained in:
@@ -1,103 +1,112 @@
|
||||
/obj
|
||||
var/can_buckle = 0
|
||||
var/list/can_buckle
|
||||
var/buckle_movable = 0
|
||||
var/buckle_dir = 0
|
||||
var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1
|
||||
var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
|
||||
var/mob/living/buckled_mob = null
|
||||
var/atom/movable/buckled = null
|
||||
|
||||
/obj/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && buckled_mob)
|
||||
user_unbuckle_mob(user)
|
||||
if(buckled)
|
||||
user_unbuckle(user)
|
||||
|
||||
/obj/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
/obj/MouseDrop_T(atom/movable/MA, mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && istype(M))
|
||||
user_buckle_mob(M, user)
|
||||
if(is_type_in_list(MA, can_buckle))
|
||||
user_buckle(MA, user)
|
||||
|
||||
//Cleanup
|
||||
|
||||
/obj/Destroy()
|
||||
unbuckle_mob()
|
||||
unbuckle()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/proc/buckle_mob(mob/living/M)
|
||||
if(!can_buckle || !istype(M) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained()))
|
||||
/obj/proc/buckle(atom/movable/MA)
|
||||
if ((MA.loc != loc) && !(density && get_dist(src, MA) <= 1))
|
||||
return 0
|
||||
|
||||
if ((M.loc != loc) && !(density && get_dist(src, M) <= 1))
|
||||
if (MA.loc != loc)
|
||||
MA.forceMove(loc)
|
||||
if (is_type_in_list(MA, can_buckle))
|
||||
if(!(MA.can_be_buckled) || MA.buckled_to)
|
||||
return 0
|
||||
MA.buckled_to = src
|
||||
buckled = MA
|
||||
if(istype(MA, /mob/living))
|
||||
var/mob/living/M = MA
|
||||
if(M.pinned.len || (buckle_require_restraints && !M.restrained()))
|
||||
return 0
|
||||
M.set_dir(buckle_dir ? buckle_dir : dir)
|
||||
M.facing_dir = null
|
||||
M.update_canmove()
|
||||
else
|
||||
MA.anchored = TRUE
|
||||
else
|
||||
return 0
|
||||
|
||||
if (M.loc != loc)
|
||||
M.forceMove(loc)
|
||||
M.buckled = src
|
||||
M.facing_dir = null
|
||||
M.set_dir(buckle_dir ? buckle_dir : dir)
|
||||
M.update_canmove()
|
||||
buckled_mob = M
|
||||
post_buckle_mob(M)
|
||||
post_buckle(MA)
|
||||
MA.layer = src.layer + 1
|
||||
return 1
|
||||
|
||||
/obj/proc/unbuckle_mob()
|
||||
if(buckled_mob && buckled_mob.buckled == src)
|
||||
. = buckled_mob
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob = null
|
||||
/obj/proc/unbuckle()
|
||||
var/atom/movable/MA = buckled
|
||||
if(MA && MA.buckled_to == src)
|
||||
. = MA
|
||||
MA.buckled_to = null
|
||||
MA.anchored = initial(MA.anchored)
|
||||
buckled = null
|
||||
if(istype(MA, /mob/living))
|
||||
var/mob/living/M = MA
|
||||
M.update_canmove()
|
||||
post_buckle(.)
|
||||
|
||||
post_buckle_mob(.)
|
||||
|
||||
/obj/proc/post_buckle_mob(mob/living/M)
|
||||
/obj/proc/post_buckle(atom/movable/MA)
|
||||
return
|
||||
|
||||
/obj/proc/user_buckle_mob(mob/living/M, mob/user)
|
||||
/obj/proc/user_buckle(atom/movable/MA, mob/user)
|
||||
if(!ROUND_IS_STARTED)
|
||||
to_chat(user, SPAN_WARNING("You can't buckle anyone in before the game starts."))
|
||||
if(!user.Adjacent(M) || user.restrained() || user.stat || istype(user, /mob/living/silicon/pai))
|
||||
to_chat(user, SPAN_WARNING("You can't buckle anything in before the game starts."))
|
||||
if(!user.Adjacent(MA) || user.restrained() || user.stat || istype(user, /mob/living/silicon/pai))
|
||||
return
|
||||
if(!M.can_buckle)
|
||||
to_chat(user, SPAN_WARNING("\The [M] can't be buckled!"))
|
||||
if(!MA.can_be_buckled)
|
||||
to_chat(user, SPAN_WARNING("\The [MA] can't be buckled_to!"))
|
||||
return
|
||||
if(M == buckled_mob)
|
||||
if(MA == buckled)
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
to_chat(user, SPAN_WARNING("\The [M] is too squishy to buckle in."))
|
||||
if(istype(MA, /mob/living/carbon/slime))
|
||||
to_chat(user, SPAN_WARNING("\The [MA] is too squishy to buckle in."))
|
||||
return
|
||||
if(buckled_mob)
|
||||
to_chat(user, SPAN_WARNING("\The [buckled_mob.name] is already there, unbuckle them first!."))
|
||||
if(buckled)
|
||||
to_chat(user, SPAN_WARNING("\The [buckled.name] is already there, unbuckle [istype(buckled, /mob/living) ? "them" : "it"] first!."))
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
unbuckle_mob()//this is now just for safety, buckling someone into an occupied chair will fail, instead of removing the occupant
|
||||
unbuckle()//this is now just for safety, buckling someone into an occupied chair will fail, instead of removing the occupant
|
||||
|
||||
if(buckle_mob(M))
|
||||
if(M == user)
|
||||
M.visible_message(\
|
||||
"<b>[M.name]</b> buckles themselves to [src].",\
|
||||
if(buckle(MA))
|
||||
if(MA == user)
|
||||
MA.visible_message(\
|
||||
"<b>[MA.name]</b> buckles themselves to [src].",\
|
||||
"<span class='notice'>You buckle yourself to [src].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
else
|
||||
M.visible_message(\
|
||||
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
MA.visible_message(\
|
||||
"<span class='danger'>[MA.name] is buckled_to to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled_to to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
|
||||
/obj/proc/user_unbuckle_mob(mob/user)
|
||||
var/mob/living/M = unbuckle_mob()
|
||||
if(M)
|
||||
if(M != user)
|
||||
M.visible_message(\
|
||||
"<b>[user.name]</b> unbuckles [M.name].", \
|
||||
/obj/proc/user_unbuckle(mob/user)
|
||||
var/atom/movable/MA = unbuckle()
|
||||
if(MA)
|
||||
if(MA != user)
|
||||
MA.visible_message(\
|
||||
"<b>[user.name]</b> unbuckles [MA.name].", \
|
||||
"<span class='notice'>You were unbuckled from [src] by [user.name].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
else
|
||||
M.visible_message(\
|
||||
"<b>[M.name]</b> unbuckles themselves.",\
|
||||
MA.visible_message(\
|
||||
"<b>[MA.name]</b> unbuckles themselves.",\
|
||||
"<span class='notice'>You unbuckle yourself from [src].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
add_fingerprint(user)
|
||||
return M
|
||||
|
||||
return MA
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
var/hasfeet = 1
|
||||
if((!l_foot || l_foot.is_stump()) && (!r_foot || r_foot.is_stump()))
|
||||
hasfeet = 0
|
||||
if(perp.shoes && !perp.buckled)//Adding blood to shoes
|
||||
if(perp.shoes && !perp.buckled_to)//Adding blood to shoes
|
||||
var/obj/item/clothing/shoes/S = perp.shoes
|
||||
if(istype(S))
|
||||
if(S.item_flags & LIGHTSTEP)
|
||||
@@ -106,8 +106,8 @@
|
||||
LAZYINITLIST(perp.feet_blood_DNA)
|
||||
if (blood_DNA)
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
|
||||
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
|
||||
else if (perp.buckled_to && istype(perp.buckled_to, /obj/structure/bed/chair/wheelchair))
|
||||
var/obj/structure/bed/chair/wheelchair/W = perp.buckled_to
|
||||
W.bloodiness = 4
|
||||
|
||||
perp.update_inv_shoes(1)
|
||||
|
||||
@@ -1,110 +1,3 @@
|
||||
/* The old single tank bombs that dont really work anymore
|
||||
/obj/effect/spawner/bomb
|
||||
name = "bomb"
|
||||
icon = 'icons/mob/screen/generic.dmi'
|
||||
icon_state = "x"
|
||||
var/btype = 0 //0 = radio, 1= prox, 2=time
|
||||
var/explosive = 1 // 0= firebomb
|
||||
var/btemp = 500 // bomb temperature (degC)
|
||||
var/active = 0
|
||||
|
||||
/obj/effect/spawner/bomb/radio
|
||||
btype = 0
|
||||
|
||||
/obj/effect/spawner/bomb/proximity
|
||||
btype = 1
|
||||
|
||||
/obj/effect/spawner/bomb/timer
|
||||
btype = 2
|
||||
|
||||
/obj/effect/spawner/bomb/timer/syndicate
|
||||
btemp = 450
|
||||
|
||||
/obj/effect/spawner/bomb/suicide
|
||||
btype = 3
|
||||
|
||||
/obj/effect/spawner/bomb/New()
|
||||
..()
|
||||
|
||||
switch (src.btype)
|
||||
// radio
|
||||
if (0)
|
||||
var/obj/item/assembly/r_i_ptank/R = new /obj/item/assembly/r_i_ptank(src.loc)
|
||||
var/obj/item/tank/phoron/p3 = new /obj/item/tank/phoron(R)
|
||||
var/obj/item/device/radio/signaler/p1 = new /obj/item/device/radio/signaler(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
R.status = explosive
|
||||
p1.b_stat = 0
|
||||
p2.secured = 1
|
||||
p3.air_contents.temperature = btemp + T0C
|
||||
|
||||
// proximity
|
||||
if (1)
|
||||
var/obj/item/assembly/m_i_ptank/R = new /obj/item/assembly/m_i_ptank(src.loc)
|
||||
var/obj/item/tank/phoron/p3 = new /obj/item/tank/phoron(R)
|
||||
var/obj/item/device/prox_sensor/p1 = new /obj/item/device/prox_sensor(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
R.status = explosive
|
||||
|
||||
p3.air_contents.temperature = btemp + T0C
|
||||
p2.secured = 1
|
||||
|
||||
if(src.active)
|
||||
R.part1.secured = 1
|
||||
R.part1.icon_state = text("motion[]", 1)
|
||||
R.c_state(1, src)
|
||||
|
||||
// timer
|
||||
if (2)
|
||||
var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank(src.loc)
|
||||
var/obj/item/tank/phoron/p3 = new /obj/item/tank/phoron(R)
|
||||
var/obj/item/device/timer/p1 = new /obj/item/device/timer(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
R.status = explosive
|
||||
|
||||
p3.air_contents.temperature = btemp + T0C
|
||||
p2.secured = 1
|
||||
//bombvest
|
||||
if(3)
|
||||
var/obj/item/clothing/suit/armor/a_i_a_ptank/R = new /obj/item/clothing/suit/armor/a_i_a_ptank(src.loc)
|
||||
var/obj/item/tank/phoron/p4 = new /obj/item/tank/phoron(R)
|
||||
var/obj/item/device/healthanalyzer/p1 = new /obj/item/device/healthanalyzer(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
var/obj/item/clothing/suit/armor/vest/p3 = new /obj/item/clothing/suit/armor/vest(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
R.part4 = p4
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
p4.master = R
|
||||
R.status = explosive
|
||||
|
||||
p4.air_contents.temperature = btemp + T0C
|
||||
p2.secured = 1
|
||||
|
||||
qdel(src)
|
||||
*/
|
||||
|
||||
/client/proc/spawn_tanktransferbomb()
|
||||
set category = "Debug"
|
||||
set desc = "Spawn a tank transfer valve bomb"
|
||||
|
||||
@@ -129,8 +129,11 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
name = "greimorian larva"
|
||||
desc = "A small, agile alien creature. It oozes some disgusting slime."
|
||||
desc_fluff = "Greimorians are a species of arthropods whose evolutionary traits have made them an extremely dangerous invasive species. \
|
||||
They originate from the Badlands planet Greima, once covered in crystalized phoron. A decaying orbit led to its combustion from proximity to its sun, and its dominant inhabitants \
|
||||
managed to survive in orbit. Countless years later, they prove to be a menace across the galaxy, having carried themselves within the hulls of Human vessels to spread wildly."
|
||||
icon_state = "spiderling"
|
||||
anchored = 0
|
||||
layer = 2.7
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
|
||||
var/can_embed = 1//If zero, this item/weapon cannot become embedded in people when you hit them with it
|
||||
var/list/armor //= list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) If null, object has 0 armor.
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden/hidden_uplink // All items can have an uplink hidden inside, just remember to add the triggers.
|
||||
var/zoomdevicename //name used for message when binoculars/scope is used
|
||||
@@ -57,6 +56,9 @@
|
||||
///Sound uses when dropping the item, or when its thrown.
|
||||
var/drop_sound = /decl/sound_category/generic_drop_sound // drop sound - this is the default
|
||||
|
||||
var/list/armor
|
||||
var/armor_degradation_speed //How fast armor will degrade, multiplier to blocked damage to get armor damage value.
|
||||
|
||||
//Item_state definition moved to /obj
|
||||
//var/item_state = null // Used to specify the item state for the on-mob overlays.
|
||||
var/item_state_slots //overrides the default item_state for particular slots.
|
||||
@@ -95,6 +97,14 @@
|
||||
var/lock_picking_level = 0 //used to determine whether something can pick a lock, and how well.
|
||||
// Its vital that if you make new power tools or new recipies that you include this
|
||||
|
||||
/obj/item/Initialize()
|
||||
. = ..()
|
||||
if(islist(armor))
|
||||
for(var/type in armor)
|
||||
if(armor[type])
|
||||
AddComponent(/datum/component/armor, armor, armor_degradation_speed)
|
||||
break
|
||||
|
||||
/obj/item/Destroy()
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
@@ -104,6 +114,11 @@
|
||||
src.loc = null
|
||||
return ..()
|
||||
|
||||
/obj/item/update_icon()
|
||||
. = ..()
|
||||
if(build_from_parts)
|
||||
cut_overlays()
|
||||
add_overlay(overlay_image(icon,"[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite
|
||||
|
||||
/obj/item/device
|
||||
icon = 'icons/obj/device.dmi'
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
var/item_path = /obj/item/bodybag
|
||||
var/contains_body = 0
|
||||
var/shapely = TRUE
|
||||
can_be_buckled = TRUE
|
||||
|
||||
/obj/structure/closet/body_bag/content_info(mob/user, content_size)
|
||||
if(!content_size && !contains_body)
|
||||
@@ -96,6 +97,11 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/closet/body_bag/open()
|
||||
if(buckled_to)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/body_bag/dump_contents(var/stored_units)
|
||||
..()
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
to_chat(user, SPAN_WARNING("You break \the [src] apart, spilling its contents everywhere!"))
|
||||
fuel = 0
|
||||
new /obj/effect/decal/cleanable/greenglow(get_turf(user))
|
||||
user.apply_effect((rand(15,30)),IRRADIATE,blocked = user.getarmor(null, "rad"))
|
||||
user.apply_damage(rand(15,30), IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
/obj/item/device/magnetic_lock/security/legion/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
desc = "A large, ID locked device used for completely locking down airlocks. This one carries the insignia of the Tau Ceti Foreign Legion."
|
||||
|
||||
/obj/item/device/magnetic_lock/Initialize()
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
desc = "Pretend to be a director for a brief moment before someone tackles you to make you shut up."
|
||||
desc_fluff = "Annoy your colleagues! Scare interns! Impress no one!"
|
||||
desc_info = "A device used to project your voice. Loudly."
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/device/lefthand_megaphone.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/device/righthand_megaphone.dmi',
|
||||
)
|
||||
icon = 'icons/obj/contained_items/tools/megaphone.dmi'
|
||||
icon_state = "megaphone"
|
||||
item_state = "megaphone"
|
||||
contained_sprite = TRUE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
flags = CONDUCT
|
||||
|
||||
|
||||
@@ -687,6 +687,7 @@ BREATH ANALYZER
|
||||
"stoxin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/soporific),
|
||||
"bicaridine_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/bicaridine),
|
||||
"dermaline_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/dermaline),
|
||||
"thetamycin_amount" = REAGENT_VOLUME(H.reagents, /decl/reagent/thetamycin),
|
||||
"blood_amount" = REAGENT_VOLUME(H.vessel, /decl/reagent/blood),
|
||||
"disabilities" = H.sdisabilities,
|
||||
"lung_ruptured" = H.is_lung_ruptured(),
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "valve_1"
|
||||
var/obj/item/tank/tank_one
|
||||
var/obj/item/tank/tank_two
|
||||
var/obj/item/device/attached_device
|
||||
var/obj/item/device/assembly/attached_device
|
||||
var/mob/attacher = null
|
||||
var/valve_open = 0
|
||||
var/toggle = 1
|
||||
@@ -98,15 +98,16 @@
|
||||
if (src.loc != usr)
|
||||
return 0
|
||||
if(tank_one && href_list["tankone"])
|
||||
remove_tank(tank_one)
|
||||
remove_tank(tank_one, usr)
|
||||
else if(tank_two && href_list["tanktwo"])
|
||||
remove_tank(tank_two)
|
||||
remove_tank(tank_two, usr)
|
||||
else if(href_list["open"])
|
||||
toggle_valve()
|
||||
else if(attached_device)
|
||||
if(href_list["rem_device"])
|
||||
attached_device.forceMove(get_turf(src))
|
||||
attached_device:holder = null
|
||||
usr.put_in_hands(attached_device)
|
||||
attached_device.holder = null
|
||||
attached_device = null
|
||||
update_icon()
|
||||
if(href_list["device"])
|
||||
@@ -139,7 +140,7 @@
|
||||
if(attached_device)
|
||||
add_overlay("device")
|
||||
|
||||
/obj/item/device/transfer_valve/proc/remove_tank(obj/item/tank/T)
|
||||
/obj/item/device/transfer_valve/proc/remove_tank(obj/item/tank/T, mob/user)
|
||||
if(tank_one == T)
|
||||
split_gases()
|
||||
tank_one = null
|
||||
@@ -150,6 +151,8 @@
|
||||
return
|
||||
|
||||
T.forceMove(get_turf(src))
|
||||
if(user)
|
||||
user.put_in_hands(T)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/transfer_valve/proc/merge_gases()
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
contains = JAR_MONEY
|
||||
if(contains != JAR_MONEY)
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("<b>[user]</b> puts [S.worth] [S.worth > 1 ? "credits" : "credit"] into \the [src]."))
|
||||
user.visible_message(SPAN_NOTICE("<b>[user]</b> puts [S.worth] credit\s into \the [src]."))
|
||||
user.drop_from_inventory(S,src)
|
||||
update_icon()
|
||||
if(istype(A, /obj/item/clothing/mask/chewable/candy/gum/gumball))
|
||||
@@ -219,7 +219,7 @@
|
||||
for(var/i = 1 to GUMBALL_MAX)
|
||||
var/obj/item/clothing/mask/chewable/candy/gum/gumball/medical/G = new(src)
|
||||
contained += G
|
||||
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
#undef JAR_NOTHING
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/device/kit/examine()
|
||||
..()
|
||||
to_chat(usr, "It has [uses] [uses>1?"uses":"use"] left.")
|
||||
to_chat(usr, "It has [uses] use\s left.")
|
||||
|
||||
/obj/item/device/kit/proc/use(var/amt, var/mob/user)
|
||||
uses -= amt
|
||||
|
||||
@@ -653,6 +653,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/flame_light_power = 2
|
||||
var/flame_light_color = LIGHT_COLOR_LAVA
|
||||
|
||||
/obj/item/flame/lighter/colourable
|
||||
icon_state = "lighter-col"
|
||||
item_state = "lighter-col"
|
||||
base_state = "lighter-col"
|
||||
build_from_parts = TRUE
|
||||
worn_overlay = "top"
|
||||
|
||||
/obj/item/flame/lighter/colourable/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/flame/lighter/zippo
|
||||
name = "\improper Zippo lighter"
|
||||
desc = "The zippo. If you've spent that amount of money on a lighter, you're either a badass or a chain smoker."
|
||||
@@ -765,6 +776,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "[base_state]"
|
||||
item_state = "[base_state]"
|
||||
update_held_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/flame/lighter/attack_self(mob/living/user)
|
||||
if(!base_state)
|
||||
|
||||
@@ -194,9 +194,9 @@
|
||||
|
||||
var/direction = get_dir(src,target)
|
||||
|
||||
if(user.buckled && isobj(user.buckled))
|
||||
if(user.buckled_to && isobj(user.buckled_to))
|
||||
spawn(0)
|
||||
propel_object(user.buckled, user, turn(direction,180))
|
||||
propel_object(user.buckled_to, user, turn(direction,180))
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
if (source.handcuffed)
|
||||
var/obj/item/W = source.handcuffed
|
||||
source.handcuffed = null
|
||||
if(source.buckled && source.buckled.buckle_require_restraints)
|
||||
source.buckled.unbuckle_mob()
|
||||
if(source.buckled_to && source.buckled_to.buckle_require_restraints)
|
||||
source.buckled_to.unbuckle()
|
||||
source.update_inv_handcuffed()
|
||||
if (source.client)
|
||||
source.client.screen -= W
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
var/damage_coef = 1
|
||||
if(H.buckled)
|
||||
if(H.buckled_to)
|
||||
return
|
||||
if(H.resting)
|
||||
return
|
||||
@@ -49,9 +49,7 @@
|
||||
damage_coef -= 0.2
|
||||
return
|
||||
|
||||
var/armor_block = H.run_armor_check(affecting, "melee")
|
||||
|
||||
if(H.apply_damage(25 * damage_coef, BRUTE, affecting, armor_block))
|
||||
if(H.apply_damage(25 * damage_coef, BRUTE, affecting))
|
||||
H.updatehealth()
|
||||
|
||||
if(H.can_feel_pain())
|
||||
|
||||
@@ -32,7 +32,9 @@ Protectiveness | Armor %
|
||||
icon_state = "material_armor"
|
||||
item_state = "material_armor"
|
||||
contained_sprite = 1
|
||||
armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
armor = list(
|
||||
melee = ARMOR_MELEE_MINOR
|
||||
)
|
||||
pocket_slots = 1
|
||||
|
||||
/obj/item/clothing/suit/armor/material/makeshift/plasteel
|
||||
@@ -96,7 +98,9 @@ Protectiveness | Armor %
|
||||
)
|
||||
icon_state = "bucket"
|
||||
item_state = "bucket"
|
||||
armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
armor = list(
|
||||
melee = ARMOR_MELEE_MINOR
|
||||
)
|
||||
contained_sprite = 1
|
||||
|
||||
/obj/item/clothing/head/helmet/bucket/wood
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
if(isliving(AM))
|
||||
var/mob/M = AM
|
||||
|
||||
if(M.buckled) //wheelchairs, office chairs, rollerbeds
|
||||
if(M.buckled_to) //wheelchairs, office chairs, rollerbeds
|
||||
return
|
||||
|
||||
to_chat(M, SPAN_DANGER("You step on \the [src]!"))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return 0
|
||||
|
||||
/obj/item/material/sword/perform_technique(var/mob/living/carbon/human/target, var/mob/living/carbon/human/user, var/target_zone)
|
||||
var/armor_reduction = target.run_armor_check(target_zone,"melee")
|
||||
var/armor_reduction = target.get_blocked_ratio(target_zone, BRUTE, DAM_EDGE|DAM_SHARP, damage = force)*100
|
||||
var/obj/item/organ/external/affecting = target.get_organ(target_zone)
|
||||
if(!affecting)
|
||||
return
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
to_chat(user, "The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry.")
|
||||
return
|
||||
|
||||
if(user && user.buckled)
|
||||
user.buckled.unbuckle_mob()
|
||||
if(user && user.buckled_to)
|
||||
user.buckled_to.unbuckle()
|
||||
|
||||
var/list/tempL = L
|
||||
var/attempt = null
|
||||
|
||||
@@ -195,10 +195,6 @@
|
||||
if(status)
|
||||
deductcharge(hitcost)
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
H.forcesay(hit_appends)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/melee/baton/emp_act(severity)
|
||||
|
||||
@@ -102,9 +102,7 @@
|
||||
if(user.a_intent == I_DISARM)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/T = target
|
||||
var/armor = T.run_armor_check(target_zone,"melee")
|
||||
|
||||
T.apply_damage(40, PAIN, target_zone, armor)
|
||||
T.apply_damage(40, PAIN, target_zone)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -168,8 +168,8 @@
|
||||
SPAN_NOTICE("You cut \the [C]'s restraints with \the [src]!"),\
|
||||
SPAN_NOTICE("You hear cable being cut."))
|
||||
C.handcuffed = null
|
||||
if(C.buckled?.buckle_require_restraints)
|
||||
C.buckled.unbuckle_mob()
|
||||
if(C.buckled_to?.buckle_require_restraints)
|
||||
C.buckled_to.unbuckle()
|
||||
C.update_inv_handcuffed()
|
||||
return
|
||||
else
|
||||
@@ -399,6 +399,9 @@
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
else if(istype(O, /obj/structure/reagent_dispensers/fueltank) && O.Adjacent(user) && welding)
|
||||
if(use_check(user, USE_DISALLOW_SPECIALS))
|
||||
to_chat(user, SPAN_WARNING("A strange force prevents you from doing this.")) //there is no way to justify this icly
|
||||
return
|
||||
var/obj/structure/reagent_dispensers/fueltank/tank = O
|
||||
if(tank.armed)
|
||||
to_chat(user, "<span class='warning'>You are already heating \the [O]!</span>")
|
||||
@@ -728,7 +731,8 @@
|
||||
. = ..()
|
||||
var/drillcolor = pick("red", "blue", "yellow", "green")
|
||||
icon_state = "powerdrill[drillcolor]"
|
||||
item_state = "powerdrill[drillcolor]"
|
||||
item_state = icon_state
|
||||
update_tool()
|
||||
|
||||
/obj/item/powerdrill/examine(var/mob/user)
|
||||
. = ..()
|
||||
@@ -737,24 +741,30 @@
|
||||
for(var/tool in tools)
|
||||
to_chat(user, "- [tool][tools[current_tool] == tool ? " (selected)" : ""]")
|
||||
|
||||
/obj/item/powerdrill/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"] && get_dist(usr, src) <= 2)
|
||||
params = replacetext(params, "shift=1;", "") // tooltip doesn't appear unless this is stripped
|
||||
openToolTip(usr, src, params, "Impact Drill:", "[capitalize(tools[current_tool])]")
|
||||
|
||||
/obj/item/powerdrill/MouseExited(location, control, params)
|
||||
. = ..()
|
||||
closeToolTip(usr)
|
||||
|
||||
/obj/item/powerdrill/iswrench()
|
||||
usesound = 'sound/items/air_wrench.ogg'
|
||||
return tools[current_tool] == "wrenchbit"
|
||||
|
||||
/obj/item/powerdrill/isscrewdriver()
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
return tools[current_tool] == "screwdriverbit"
|
||||
|
||||
/obj/item/powerdrill/iscrowbar()
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
return tools[current_tool] == "crowbarbit"
|
||||
|
||||
/obj/item/powerdrill/proc/update_tool()
|
||||
cut_overlays()
|
||||
if(isscrewdriver())
|
||||
cut_overlays()
|
||||
usesound = 'sound/items/air_wrench.ogg'
|
||||
add_overlay("screwdriverbit")
|
||||
if(iswrench())
|
||||
cut_overlays()
|
||||
else if(iswrench())
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
add_overlay("wrenchbit")
|
||||
|
||||
/obj/item/powerdrill/attack_self(var/mob/user)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 18750)
|
||||
var/deployed = FALSE
|
||||
var/time_to_escape = 60
|
||||
var/ignore_armor = FALSE
|
||||
var/activated_armor_penetration = 0
|
||||
|
||||
/obj/item/trap/proc/can_use(mob/user)
|
||||
return (user.IsAdvancedToolUser() && !issilicon(user) && !user.stat && !user.restrained())
|
||||
@@ -46,33 +46,33 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/trap/user_unbuckle_mob(mob/user)
|
||||
if(buckled_mob && can_use(user))
|
||||
/obj/item/trap/user_unbuckle(mob/user)
|
||||
if(buckled && can_use(user))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] begins freeing \the [buckled_mob] from \the [src]..."),
|
||||
SPAN_NOTICE("You carefully begin to free \the [buckled_mob] from \the [src]..."),
|
||||
SPAN_NOTICE("\The [user] begins freeing \the [buckled] from \the [src]..."),
|
||||
SPAN_NOTICE("You carefully begin to free \the [buckled] from \the [src]..."),
|
||||
SPAN_NOTICE("You hear metal creaking.")
|
||||
)
|
||||
if(do_after(user, time_to_escape))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] frees \the [buckled_mob] from \the [src]."),
|
||||
SPAN_NOTICE("You free \the [buckled_mob] from \the [src].")
|
||||
SPAN_NOTICE("\The [user] frees \the [buckled] from \the [src]."),
|
||||
SPAN_NOTICE("You free \the [buckled] from \the [src].")
|
||||
)
|
||||
unbuckle_mob()
|
||||
unbuckle()
|
||||
anchored = FALSE
|
||||
|
||||
/obj/item/trap/attack_hand(mob/user)
|
||||
if(buckled_mob && can_use(user))
|
||||
if(buckled && can_use(user))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] begins freeing \the [buckled_mob] from \the [src]..."),
|
||||
SPAN_NOTICE("You carefully begin to free \the [buckled_mob] from \the [src]...")
|
||||
SPAN_NOTICE("\The [user] begins freeing \the [buckled] from \the [src]..."),
|
||||
SPAN_NOTICE("You carefully begin to free \the [buckled] from \the [src]...")
|
||||
)
|
||||
if(do_after(user, time_to_escape))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The user frees \the [buckled_mob] from \the [src]."),
|
||||
SPAN_NOTICE("You free \the [buckled_mob] from \the [src].")
|
||||
SPAN_NOTICE("\The user frees \the [buckled] from \the [src]."),
|
||||
SPAN_NOTICE("You free \the [buckled] from \the [src].")
|
||||
)
|
||||
unbuckle_mob()
|
||||
unbuckle()
|
||||
anchored = FALSE
|
||||
else if(deployed && can_use(user))
|
||||
user.visible_message(
|
||||
@@ -98,18 +98,9 @@
|
||||
else
|
||||
target_zone = pick(BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG)
|
||||
|
||||
if(!ignore_armor)
|
||||
//armor
|
||||
var/blocked = L.run_armor_check(target_zone, "melee")
|
||||
if(blocked >= 100)
|
||||
return
|
||||
var/success = L.apply_damage(30, BRUTE, target_zone, blocked, src)
|
||||
if(!success)
|
||||
return FALSE
|
||||
else
|
||||
var/success = L.apply_damage(30, BRUTE, target_zone, 0, src)
|
||||
if(!success)
|
||||
return FALSE
|
||||
var/success = L.apply_damage(30, BRUTE, target_zone, used_weapon = src, armor_pen = activated_armor_penetration)
|
||||
if(!success)
|
||||
return FALSE
|
||||
|
||||
var/did_trap = TRUE
|
||||
if(ishuman(L))
|
||||
@@ -120,8 +111,8 @@
|
||||
|
||||
if(did_trap)
|
||||
//trap the victim in place
|
||||
can_buckle = TRUE
|
||||
buckle_mob(L)
|
||||
can_buckle = list(/mob/living)
|
||||
buckle(L)
|
||||
can_buckle = initial(can_buckle)
|
||||
|
||||
deployed = FALSE
|
||||
@@ -142,7 +133,7 @@
|
||||
SPAN_WARNING("<b>You hear a loud metallic snap!</b>")
|
||||
)
|
||||
attack_mob(L)
|
||||
if(!buckled_mob)
|
||||
if(!buckled)
|
||||
anchored = FALSE
|
||||
deployed = FALSE
|
||||
update_icon()
|
||||
@@ -156,7 +147,7 @@
|
||||
/obj/item/trap/sharpened
|
||||
name = "sharpened mechanical trap"
|
||||
desc_antag = "This device has an even higher chance of penetrating armor and locking foes in place."
|
||||
ignore_armor = TRUE
|
||||
activated_armor_penetration = 100
|
||||
|
||||
/obj/item/trap/animal
|
||||
name = "small trap"
|
||||
@@ -174,7 +165,7 @@
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1750)
|
||||
deployed = FALSE
|
||||
time_to_escape = 3 // Minutes
|
||||
can_buckle = TRUE
|
||||
can_buckle = list(/mob/living)
|
||||
var/breakout = FALSE
|
||||
var/last_shake = 0
|
||||
var/list/allowed_mobs = list(/mob/living/simple_animal/rat, /mob/living/simple_animal/chick, /mob/living/simple_animal/lizard)
|
||||
@@ -233,7 +224,7 @@
|
||||
if(AM.loc != loc)
|
||||
AM.forceMove(loc)
|
||||
captured = WEAKREF(L)
|
||||
buckle_mob(L)
|
||||
buckle(L)
|
||||
playsound(src, 'sound/weapons/beartrap_shut.ogg', 100, 1)
|
||||
deployed = FALSE
|
||||
src.shake_animation()
|
||||
@@ -258,7 +249,7 @@
|
||||
return TRUE
|
||||
|
||||
// If we are stuck, and need to get out
|
||||
/obj/item/trap/animal/user_unbuckle_mob(var/mob/living/escapee)
|
||||
/obj/item/trap/animal/user_unbuckle(var/mob/living/escapee)
|
||||
if (req_breakout() < 1)
|
||||
return
|
||||
|
||||
@@ -369,7 +360,7 @@
|
||||
var/mob/living/ll = L
|
||||
msg = "<span class='warning'>[ll] runs out of \the [src].</span>"
|
||||
|
||||
unbuckle_mob()
|
||||
unbuckle()
|
||||
captured = null
|
||||
visible_message(msg)
|
||||
shake_animation()
|
||||
@@ -438,7 +429,7 @@
|
||||
var/datum/M = captured.resolve()
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
if(L && buckled_mob.buckled == src)
|
||||
if(L && buckled.buckled_to == src)
|
||||
L.forceMove(loc)
|
||||
else if(L)
|
||||
captured = null
|
||||
@@ -571,7 +562,7 @@
|
||||
/mob/living/simple_animal/pig)
|
||||
|
||||
/obj/item/trap/animal/large/attack_hand(mob/user)
|
||||
if(user == buckled_mob)
|
||||
if(user == buckled)
|
||||
return
|
||||
else if(!anchored)
|
||||
to_chat(user, SPAN_WARNING("You need to anchor \the [src] first!"))
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
species_restricted = list(BODYTYPE_VAURCA,BODYTYPE_VAURCA_WARFORM)
|
||||
sprite_sheets = list(
|
||||
BODYTYPE_VAURCA_WARFORM = 'icons/mob/species/warriorform/shoes.dmi'
|
||||
)
|
||||
)
|
||||
|
||||
action_button_name = "Toggle the magclaws"
|
||||
|
||||
@@ -257,8 +257,13 @@
|
||||
slowdown = -1
|
||||
|
||||
species_restricted = list(BODYTYPE_VAURCA)
|
||||
armor = list(melee = 50, bullet = 20, laser = 50, energy = 30, bomb = 45, bio = 100, rad = 10)
|
||||
|
||||
armor = list(
|
||||
melee = ARMOR_MELEE_RESISTANT,
|
||||
bullet = ARMOR_BALLISTIC_SMALL,
|
||||
laser = ARMOR_LASER_SMALL,
|
||||
bomb = ARMOR_BOMB_PADDED,
|
||||
bio = ARMOR_BIO_SHIELDED
|
||||
)
|
||||
/obj/item/clothing/head/helmet/space/void/scout
|
||||
name = "scout helmet"
|
||||
desc = "A helmet designed for K'laxan scouts, made of lightweight sturdy material that does not restrict movement."
|
||||
@@ -268,8 +273,13 @@
|
||||
item_state = "helm_scout"
|
||||
|
||||
species_restricted = list(BODYTYPE_VAURCA)
|
||||
armor = list(melee = 40, bullet = 20, laser = 40, energy = 30, bomb = 45, bio = 100, rad = 10)
|
||||
|
||||
armor = list(
|
||||
melee = ARMOR_MELEE_RESISTANT,
|
||||
bullet = ARMOR_BALLISTIC_SMALL,
|
||||
laser = ARMOR_LASER_SMALL,
|
||||
bomb = ARMOR_BOMB_PADDED,
|
||||
bio = ARMOR_BIO_SHIELDED
|
||||
)
|
||||
light_overlay = "helmet_light_dual_green"
|
||||
light_color = "#3e7c3e"
|
||||
|
||||
@@ -282,8 +292,14 @@
|
||||
desc = "A design perfected by the Zo'ra, this helmet is commonly used by frontline warriors of a hive. Ablative design deflects lasers away from the body while providing moderate physical protection."
|
||||
|
||||
species_restricted = list(BODYTYPE_VAURCA)
|
||||
armor = list(melee = 40, bullet = 40, laser = 60, energy = 50, bomb = 45, bio = 100, rad = 10)
|
||||
|
||||
armor = list(
|
||||
melee = ARMOR_MELEE_RESISTANT,
|
||||
bullet = ARMOR_BALLISTIC_RESISTANT,
|
||||
laser = ARMOR_LASER_MAJOR,
|
||||
bomb = ARMOR_BOMB_PADDED,
|
||||
bio = ARMOR_BIO_SHIELDED,
|
||||
rad = ARMOR_RAD_MINOR
|
||||
)
|
||||
/obj/item/clothing/head/helmet/space/void/commando
|
||||
name = "commando helmet"
|
||||
desc = "A design perfected by the Zo'ra, this helmet is commonly used by frontline warriors of a hive. Ablative design deflects lasers away from the body while providing moderate physical protection."
|
||||
@@ -293,7 +309,14 @@
|
||||
item_state = "helm_commando"
|
||||
|
||||
species_restricted = list(BODYTYPE_VAURCA)
|
||||
armor = list(melee = 30, bullet = 30, laser = 60, energy = 50, bomb = 45, bio = 100, rad = 10)
|
||||
armor = list(
|
||||
melee = ARMOR_MELEE_RESISTANT,
|
||||
bullet = ARMOR_BALLISTIC_RESISTANT,
|
||||
laser = ARMOR_LASER_MAJOR,
|
||||
bomb = ARMOR_BOMB_PADDED,
|
||||
bio = ARMOR_BIO_SHIELDED,
|
||||
rad = ARMOR_RAD_MINOR
|
||||
)
|
||||
|
||||
light_overlay = "helmet_light_dual_green"
|
||||
light_color = "#3e7c3e"
|
||||
@@ -307,7 +330,13 @@
|
||||
gas_filter_strength = 3
|
||||
w_class = ITEMSIZE_SMALL
|
||||
filtered_gases = list(GAS_NITROGEN, GAS_N2O)
|
||||
armor = list(melee = 25, bullet = 10, laser = 25, energy = 25, bomb = 0, bio = 50, rad = 15)
|
||||
armor = list(
|
||||
melee = ARMOR_MELEE_RESISTANT,
|
||||
bullet = ARMOR_BALLISTIC_MINOR,
|
||||
laser = ARMOR_LASER_SMALL,
|
||||
bio = ARMOR_BIO_STRONG,
|
||||
rad = ARMOR_RAD_MINOR
|
||||
)
|
||||
icon = 'icons/obj/vaurca_items.dmi'
|
||||
icon_state = "m_metalg"
|
||||
item_state = "m_metalg"
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/obj/item/weldpack
|
||||
name = "Welding kit"
|
||||
desc = "A heavy-duty, portable welding fluid carrier."
|
||||
slot_flags = SLOT_BACK
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "welderpack"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
var/max_fuel = 350
|
||||
drop_sound = 'sound/items/drop/backpack.ogg'
|
||||
pickup_sound = 'sound/items/pickup/backpack.ogg'
|
||||
|
||||
/obj/item/weldpack/New()
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel) //Lotsa refills
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent(/decl/reagent/fuel, max_fuel)
|
||||
|
||||
/obj/item/weldpack/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.iswelder())
|
||||
var/obj/item/weldingtool/T = W
|
||||
if(T.welding & prob(50))
|
||||
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
|
||||
log_game("[key_name(user)] triggered a fueltank explosion.",ckey=key_name(user))
|
||||
to_chat(user, "<span class='danger'>That was stupid of you.</span>")
|
||||
explosion(get_turf(src),-1,0,2)
|
||||
if(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
if(T.welding)
|
||||
to_chat(user, "<span class='danger'>That was close!</span>")
|
||||
src.reagents.trans_to_obj(W, T.max_fuel)
|
||||
to_chat(user, "<span class='notice'>Welder refilled!</span>")
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
to_chat(user, "<span class='warning'>The tank scoffs at your insolence. It only provides services to welders.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weldpack/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) // this replaces and improves the get_dist(src,O) <= 1 checks used previously
|
||||
return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume < max_fuel)
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
to_chat(user, "<span class='notice'>You crack the cap off the top of the pack and fill it back up again from the tank.</span>")
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume == max_fuel)
|
||||
to_chat(user, "<span class='warning'>The pack is already full!</span>")
|
||||
return
|
||||
|
||||
/obj/item/weldpack/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, text("[icon2html(src, user)] [] units of fuel left!", src.reagents.total_volume))
|
||||
return
|
||||
@@ -190,7 +190,7 @@
|
||||
return 0
|
||||
if(!Adjacent(user))
|
||||
return 0
|
||||
if (user.restrained() || user.buckled)
|
||||
if (user.restrained() || user.buckled_to)
|
||||
to_chat(user, "<span class='notice'>You need your hands and legs free for this.</span>")
|
||||
return 0
|
||||
if (user.stat || user.paralysis || user.sleeping || user.lying || user.weakened)
|
||||
|
||||
@@ -106,17 +106,15 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
/obj/structure/closet/dump_contents()
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src)
|
||||
for(var/obj/effect/dummy/chameleon/AD in contents)
|
||||
AD.forceMove(loc)
|
||||
|
||||
for(var/obj/I in src)
|
||||
if(linked_teleporter && I == linked_teleporter)
|
||||
continue
|
||||
for(var/obj/I in contents - linked_teleporter)
|
||||
I.forceMove(loc)
|
||||
|
||||
for(var/mob/M in src)
|
||||
for(var/mob/M in contents)
|
||||
M.forceMove(loc)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
@@ -189,7 +187,7 @@
|
||||
/obj/structure/closet/proc/store_mobs(var/stored_units)
|
||||
var/added_units = 0
|
||||
for(var/mob/living/M in loc)
|
||||
if(M.buckled || M.pinned.len)
|
||||
if(M.buckled_to || M.pinned.len)
|
||||
continue
|
||||
if(M.mob_size >= maximum_mob_size)
|
||||
continue
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/weldpack(src)
|
||||
new /obj/item/weldpack(src)
|
||||
new /obj/item/weldpack(src)
|
||||
new /obj/item/reagent_containers/weldpack(src)
|
||||
new /obj/item/reagent_containers/weldpack(src)
|
||||
new /obj/item/reagent_containers/weldpack(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal
|
||||
name = "engineer's locker"
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
/obj/structure/closet/statue/Initialize(mapload, mob/living/L)
|
||||
if(isliving(L))
|
||||
if(L.buckled)
|
||||
L.buckled = 0
|
||||
if(L.buckled_to)
|
||||
L.buckled_to = 0
|
||||
L.anchored = 0
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
continue
|
||||
if(istype(O, /obj/structure/bed)) //This is only necessary because of rollerbeds and swivel chairs.
|
||||
var/obj/structure/bed/B = O
|
||||
if(B.buckled_mob)
|
||||
if(B.buckled)
|
||||
continue
|
||||
O.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
@@ -28,25 +28,26 @@
|
||||
/obj/structure/bed/nest/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/user)
|
||||
if(buckled_mob?.buckled == src)
|
||||
/obj/structure/bed/nest/user_unbuckle(mob/user)
|
||||
if(buckled?.buckled_to == src)
|
||||
add_fingerprint(user)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message("<b>[user]</b> pulls [buckled_mob] free from the sticky flesh!", SPAN_NOTICE("[user] pulls you free from the gelatinous flesh."), SPAN_WARNING("You hear squelching..."))
|
||||
unbuckle_buckled_mob(buckled_mob)
|
||||
else
|
||||
if(world.time <= buckled_mob.last_special + NEST_RESIST_TIME)
|
||||
if(buckled != user)
|
||||
buckled.visible_message("<b>[user]</b> pulls [buckled] free from the sticky flesh!", SPAN_NOTICE("[user] pulls you free from the gelatinous flesh."), SPAN_WARNING("You hear squelching..."))
|
||||
unbuckle_buckled_mob(buckled)
|
||||
else if(istype(buckled, /mob/living))
|
||||
var/mob/living/M = buckled
|
||||
if(world.time <= M.last_special + NEST_RESIST_TIME)
|
||||
return
|
||||
buckled_mob.last_special = world.time
|
||||
buckled_mob.visible_message(SPAN_WARNING("[buckled_mob] starts struggling to break free of the sticky flesh..."), SPAN_WARNING("You struggle to break free from the gelatinous flesh..."), SPAN_WARNING("You hear squelching..."))
|
||||
if(do_after(buckled_mob, NEST_RESIST_TIME, TRUE))
|
||||
unbuckle_buckled_mob(buckled_mob)
|
||||
M.last_special = world.time
|
||||
M.visible_message(SPAN_WARNING("[M] starts struggling to break free of the sticky flesh..."), SPAN_WARNING("You struggle to break free from the gelatinous flesh..."), SPAN_WARNING("You hear squelching..."))
|
||||
if(do_after(M, NEST_RESIST_TIME, TRUE))
|
||||
unbuckle_buckled_mob(M)
|
||||
|
||||
/obj/structure/bed/nest/proc/unbuckle_buckled_mob(var/mob/buck)
|
||||
if(buckled_mob == buck && buck.buckled == src)
|
||||
if(buckled == buck && buck.buckled_to == src)
|
||||
buck.pixel_y = 0
|
||||
buck.old_y = 0
|
||||
unbuckle_mob()
|
||||
unbuckle()
|
||||
|
||||
/obj/structure/bed/nest/attackby(obj/item/W, mob/user)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/bed/B = A
|
||||
if (istype(A, /obj/structure/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
if (istype(A, /obj/structure/bed) && B.buckled)//if it's a bed/chair and someone is buckled_to, it will not pass
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
|
||||
L.apply_damage(round(material.radioactivity/3),IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
|
||||
/obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, MATERIAL_IRON, complexity)
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
icon = 'icons/obj/furniture.dmi'
|
||||
icon_state = "bed"
|
||||
anchored = TRUE
|
||||
can_buckle = TRUE
|
||||
buckle_dir = SOUTH
|
||||
buckle_lying = 1
|
||||
|
||||
build_amt = 2
|
||||
var/material/padding_material
|
||||
|
||||
@@ -32,6 +30,10 @@
|
||||
var/makes_rolling_sound = TRUE
|
||||
slowdown = 5
|
||||
|
||||
/obj/structure/bed/Initialize()
|
||||
..()
|
||||
LAZYADD(can_buckle, /mob/living)
|
||||
|
||||
/obj/structure/bed/New(newloc, new_material = MATERIAL_STEEL, new_padding_material)
|
||||
..(newloc)
|
||||
color = null
|
||||
@@ -43,7 +45,7 @@
|
||||
padding_material = SSmaterials.get_material_by_name(new_padding_material)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/buckle_mob(mob/living/M)
|
||||
/obj/structure/bed/buckle(mob/living/M)
|
||||
. = ..()
|
||||
if(. && buckling_sound)
|
||||
playsound(src, buckling_sound, 20)
|
||||
@@ -84,8 +86,8 @@
|
||||
|
||||
/obj/structure/bed/forceMove(atom/dest)
|
||||
. = ..()
|
||||
if(buckled_mob)
|
||||
buckled_mob.forceMove(dest)
|
||||
if(buckled)
|
||||
buckled.forceMove(dest)
|
||||
|
||||
/obj/structure/bed/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
@@ -153,17 +155,17 @@
|
||||
if(do_after(user, 20))
|
||||
affecting.forceMove(loc)
|
||||
spawn(0)
|
||||
if(buckle_mob(affecting))
|
||||
if(buckle(affecting))
|
||||
affecting.visible_message(\
|
||||
"<span class='danger'>[affecting.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>[affecting.name] is buckled_to to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled_to to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
qdel(W)
|
||||
|
||||
else if(istype(W, /obj/item/gripper) && buckled_mob)
|
||||
else if(istype(W, /obj/item/gripper) && buckled)
|
||||
var/obj/item/gripper/G = W
|
||||
if(!G.wrapped)
|
||||
user_unbuckle_mob(user)
|
||||
user_unbuckle(user)
|
||||
|
||||
else if(istype(W, /obj/item/disk))
|
||||
user.drop_from_inventory(W, get_turf(src))
|
||||
@@ -228,8 +230,14 @@
|
||||
var/obj/item/reagent_containers/beaker
|
||||
var/iv_attached = 0
|
||||
var/iv_stand = TRUE
|
||||
var/patient_shift = 9 //How much are mobs moved up when they are buckled_to.
|
||||
var/bag_strap = "standard_straps"
|
||||
slowdown = 0
|
||||
|
||||
/obj/structure/bed/roller/Initialize()
|
||||
..()
|
||||
LAZYADD(can_buckle, /obj/structure/closet/body_bag)
|
||||
|
||||
/obj/structure/bed/roller/update_icon()
|
||||
overlays.Cut()
|
||||
if(density)
|
||||
@@ -247,6 +255,8 @@
|
||||
if(density)
|
||||
iv.pixel_y = 6
|
||||
overlays += iv
|
||||
if(bag_strap && istype(buckled, /obj/structure/closet/body_bag))
|
||||
buckled.overlays += image(icon, bag_strap)
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/I, mob/user)
|
||||
if(iswrench(I) || istype(I, /obj/item/stack) || iswirecutter(I))
|
||||
@@ -261,7 +271,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/bed/roller/attack_hand(mob/living/user)
|
||||
if(beaker && !buckled_mob)
|
||||
if(beaker && !buckled)
|
||||
remove_beaker(user)
|
||||
else
|
||||
..()
|
||||
@@ -272,14 +282,14 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/roller/process()
|
||||
if(!iv_attached || !buckled_mob || !beaker)
|
||||
if(!iv_attached || !buckled || !beaker)
|
||||
return PROCESS_KILL
|
||||
|
||||
if(SSprocessing.times_fired % 2)
|
||||
return
|
||||
|
||||
if(beaker.volume > 0)
|
||||
beaker.reagents.trans_to_mob(buckled_mob, beaker.amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
beaker.reagents.trans_to_mob(buckled, beaker.amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/roller/proc/remove_beaker(mob/user)
|
||||
@@ -310,20 +320,20 @@
|
||||
return
|
||||
if(!(ishuman(usr) || isrobot(usr)))
|
||||
return
|
||||
if(over_object == buckled_mob && beaker)
|
||||
if(over_object == buckled && beaker)
|
||||
if(iv_attached)
|
||||
detach_iv(buckled_mob, usr)
|
||||
detach_iv(buckled, usr)
|
||||
else
|
||||
attach_iv(buckled_mob, usr)
|
||||
attach_iv(buckled, usr)
|
||||
return
|
||||
if(ishuman(over_object))
|
||||
if(user_buckle_mob(over_object, usr))
|
||||
attach_iv(buckled_mob, usr)
|
||||
if(user_buckle(over_object, usr))
|
||||
attach_iv(buckled, usr)
|
||||
return
|
||||
if(beaker)
|
||||
remove_beaker(usr)
|
||||
return
|
||||
if(buckled_mob)
|
||||
if(buckled)
|
||||
return
|
||||
collapse()
|
||||
|
||||
@@ -331,33 +341,44 @@
|
||||
..()
|
||||
if(makes_rolling_sound)
|
||||
playsound(src, 'sound/effects/roll.ogg', 100, 1)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.forceMove(src.loc)
|
||||
if(buckled)
|
||||
if(buckled.buckled_to == src)
|
||||
buckled.forceMove(src.loc)
|
||||
buckled.layer = src.layer + 1
|
||||
else
|
||||
buckled_mob = null
|
||||
buckled = null
|
||||
|
||||
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
|
||||
/obj/structure/bed/roller/post_buckle(atom/movable/MA)
|
||||
. = ..()
|
||||
if(M == buckled_mob)
|
||||
if(MA == buckled)
|
||||
if(istype(MA, /mob/living))
|
||||
var/mob/living/M = MA
|
||||
M.old_y = patient_shift
|
||||
density = TRUE
|
||||
M.pixel_y = 6
|
||||
M.old_y = 6
|
||||
buckled.pixel_y = patient_shift
|
||||
update_icon()
|
||||
else
|
||||
if(istype(MA, /mob/living))
|
||||
var/mob/living/M = MA
|
||||
M.old_y = 0
|
||||
if(iv_attached)
|
||||
detach_iv(M, usr)
|
||||
else
|
||||
MA.overlays.Cut() //Remove straps
|
||||
MA.update_icon() //Add label back (if it had one)
|
||||
density = FALSE
|
||||
M.pixel_y = 0
|
||||
M.old_y = 0
|
||||
if(iv_attached)
|
||||
detach_iv(M, usr)
|
||||
MA.pixel_y = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/bed/roller/hover
|
||||
name = "medical hoverbed"
|
||||
icon_state = "hover_down"
|
||||
base_state = "hover"
|
||||
makes_rolling_sound = FALSE
|
||||
item_bedpath = /obj/item/roller/hover
|
||||
patient_shift = 6
|
||||
bag_strap = null
|
||||
|
||||
/obj/structure/bed/roller/hover/Initialize()
|
||||
.=..()
|
||||
@@ -372,7 +393,7 @@
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
center_of_mass = list("x" = 17,"y" = 7)
|
||||
var/bedpath = /obj/structure/bed/roller
|
||||
w_class = ITEMSIZE_LARGE // Can't be put in backpacks. Oh well.
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/roller/hover
|
||||
name = "medical hoverbed"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
build_amt = 1
|
||||
|
||||
buckle_dir = 0
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled_to
|
||||
obj_flags = OBJ_FLAG_ROTATABLE_ANCHORED
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/chair/do_simple_ranged_interaction(var/mob/user)
|
||||
if(!buckled_mob && user)
|
||||
if(!buckled && user)
|
||||
rotate(user)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/bed/chair/post_buckle_mob()
|
||||
/obj/structure/bed/chair/post_buckle()
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
|
||||
if(buckled_mob)
|
||||
if(buckled)
|
||||
cache_key = "[base_icon]-[material.name]-armrest"
|
||||
if(!stool_cache[cache_key])
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
@@ -81,8 +81,8 @@
|
||||
|
||||
/obj/structure/bed/chair/set_dir()
|
||||
. = ..()
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
if(buckled)
|
||||
buckled.set_dir(dir)
|
||||
|
||||
// Leaving this in for the sake of compilation.
|
||||
/obj/structure/bed/chair/comfy
|
||||
@@ -135,43 +135,41 @@
|
||||
. = ..()
|
||||
if(makes_rolling_sound)
|
||||
playsound(src, 'sound/effects/roll.ogg', 100, 1)
|
||||
if(buckled_mob)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
occupant.buckled = null
|
||||
if(buckled)
|
||||
var/mob/living/occupant = buckled
|
||||
occupant.buckled_to = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
occupant.buckled_to = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Collide(O)
|
||||
else
|
||||
unbuckle_mob()
|
||||
unbuckle()
|
||||
|
||||
/obj/structure/bed/chair/office/Collide(atom/A)
|
||||
. = ..()
|
||||
if(!buckled_mob)
|
||||
if(!buckled)
|
||||
return
|
||||
|
||||
if(propelled)
|
||||
var/mob/living/occupant = unbuckle_mob()
|
||||
var/mob/living/occupant = unbuckle()
|
||||
|
||||
var/def_zone = ran_zone()
|
||||
var/blocked = occupant.run_armor_check(def_zone, "melee")
|
||||
occupant.throw_at(A, 3, propelled)
|
||||
occupant.apply_effect(6, STUN, blocked)
|
||||
occupant.apply_effect(6, WEAKEN, blocked)
|
||||
occupant.apply_effect(6, STUTTER, blocked)
|
||||
occupant.apply_damage(10, BRUTE, def_zone, blocked)
|
||||
occupant.apply_effect(6, STUN)
|
||||
occupant.apply_effect(6, WEAKEN)
|
||||
occupant.apply_effect(6, STUTTER)
|
||||
occupant.apply_damage(10, BRUTE, def_zone)
|
||||
playsound(src.loc, "punch", 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/victim = A
|
||||
def_zone = ran_zone()
|
||||
blocked = victim.run_armor_check(def_zone, "melee")
|
||||
victim.apply_effect(6, STUN, blocked)
|
||||
victim.apply_effect(6, WEAKEN, blocked)
|
||||
victim.apply_effect(6, STUTTER, blocked)
|
||||
victim.apply_damage(10, BRUTE, def_zone, blocked)
|
||||
victim.apply_effect(6, STUN)
|
||||
victim.apply_effect(6, WEAKEN)
|
||||
victim.apply_effect(6, STUTTER)
|
||||
victim.apply_damage(10, BRUTE, def_zone)
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/bed/chair/office/light
|
||||
@@ -258,8 +256,8 @@
|
||||
can_dismantle = FALSE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/bed/chair/shuttle/post_buckle_mob()
|
||||
if(buckled_mob)
|
||||
/obj/structure/bed/chair/shuttle/post_buckle()
|
||||
if(buckled)
|
||||
base_icon = "shuttlechair-b"
|
||||
else
|
||||
base_icon = "shuttlechair"
|
||||
@@ -267,7 +265,7 @@
|
||||
|
||||
/obj/structure/bed/chair/shuttle/update_icon()
|
||||
..()
|
||||
if(!buckled_mob)
|
||||
if(!buckled)
|
||||
var/image/I = image(icon, "[base_icon]_special")
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR)
|
||||
@@ -283,14 +281,14 @@
|
||||
/obj/structure/bed/chair/pool/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/pool/buckle_mob(mob/living/M)
|
||||
/obj/structure/bed/chair/pool/buckle(mob/living/M)
|
||||
if(!iscarbon(M))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/chair/pool/post_buckle_mob(mob/living/M)
|
||||
/obj/structure/bed/chair/pool/post_buckle(mob/living/M)
|
||||
. = ..()
|
||||
if(M == buckled_mob)
|
||||
if(M == buckled)
|
||||
M.pixel_y = -6
|
||||
else
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
dismantle()
|
||||
qdel(src)
|
||||
|
||||
var/blocked = target.run_armor_check(hit_zone, "melee")
|
||||
target.Weaken(10 * BLOCKED_MULT(blocked))
|
||||
var/blocked = target.get_blocked_ratio(hit_zone, BRUTE)
|
||||
target.Weaken(10 * (1 - blocked))
|
||||
target.apply_damage(20, BRUTE, hit_zone, blocked, src)
|
||||
return
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||
. = ..()
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
if(buckled)
|
||||
buckled.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
@@ -33,7 +33,7 @@
|
||||
user.pulledby = null
|
||||
to_chat(user, "<span class='warning'>You lost your grip!</span>")
|
||||
return
|
||||
if(buckled_mob && pulling && user == buckled_mob)
|
||||
if(buckled && pulling && user == buckled)
|
||||
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
@@ -51,7 +51,7 @@
|
||||
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
|
||||
to_chat(user, "<span class='warning'>You cannot go there.</span>")
|
||||
return
|
||||
if(pulling && buckled_mob && (buckled_mob == user))
|
||||
if(pulling && buckled && (buckled == user))
|
||||
to_chat(user, "<span class='warning'>You cannot drive while being pushed.</span>")
|
||||
return
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
driving = 1
|
||||
var/turf/T = null
|
||||
//--1---Move occupant---1--//
|
||||
if(buckled_mob)
|
||||
buckled_mob.buckled = null
|
||||
step(buckled_mob, direction)
|
||||
buckled_mob.buckled = src
|
||||
if(buckled)
|
||||
buckled.buckled_to = null
|
||||
step(buckled, direction)
|
||||
buckled.buckled_to = src
|
||||
//--2----Move driver----2--//
|
||||
if(pulling)
|
||||
T = pulling.loc
|
||||
@@ -70,8 +70,8 @@
|
||||
step(pulling, get_dir(pulling.loc, src.loc))
|
||||
//--3--Move wheelchair--3--//
|
||||
step(src, direction)
|
||||
if(buckled_mob) // Make sure it stays beneath the occupant
|
||||
Move(buckled_mob.loc)
|
||||
if(buckled) // Make sure it stays beneath the occupant
|
||||
Move(buckled.loc)
|
||||
set_dir(direction)
|
||||
if(pulling) // Driver
|
||||
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
|
||||
@@ -89,19 +89,19 @@
|
||||
/obj/structure/bed/chair/wheelchair/Move()
|
||||
. = ..()
|
||||
playsound(src, 'sound/effects/roll.ogg', 75, 1)
|
||||
if(buckled_mob)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
if(buckled)
|
||||
var/mob/living/occupant = buckled
|
||||
if(!driving)
|
||||
occupant.buckled = null
|
||||
occupant.buckled_to = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
occupant.buckled_to = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Collide(O)
|
||||
else
|
||||
unbuckle_mob()
|
||||
unbuckle()
|
||||
if (pulling && (get_dist(src, pulling) > 1))
|
||||
pulling.pulledby = null
|
||||
to_chat(pulling, "<span class='warning'>You lost your grip!</span>")
|
||||
@@ -114,13 +114,13 @@
|
||||
if (pulling)
|
||||
MouseDrop(usr)
|
||||
else
|
||||
user_unbuckle_mob(user)
|
||||
user_unbuckle(user)
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/CtrlClick(var/mob/user)
|
||||
if(in_range(src, user))
|
||||
if(!ishuman(user)) return
|
||||
if(user == buckled_mob)
|
||||
if(user == buckled)
|
||||
to_chat(user, "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>")
|
||||
return
|
||||
if(!pulling)
|
||||
@@ -138,11 +138,11 @@
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/Collide(atom/A)
|
||||
. = ..()
|
||||
if(!buckled_mob)
|
||||
if(!buckled)
|
||||
return
|
||||
|
||||
if(propelled || (pulling && (pulling.a_intent == I_HURT)))
|
||||
var/mob/living/occupant = unbuckle_mob()
|
||||
var/mob/living/occupant = unbuckle()
|
||||
|
||||
if (pulling && (pulling.a_intent == I_HURT))
|
||||
occupant.throw_at(A, 3, 3, pulling)
|
||||
@@ -150,21 +150,19 @@
|
||||
occupant.throw_at(A, 3, propelled)
|
||||
|
||||
var/def_zone = ran_zone()
|
||||
var/blocked = occupant.run_armor_check(def_zone, "melee")
|
||||
occupant.throw_at(A, 3, propelled)
|
||||
occupant.apply_effect(6, STUN, blocked)
|
||||
occupant.apply_effect(6, WEAKEN, blocked)
|
||||
occupant.apply_effect(6, STUTTER, blocked)
|
||||
occupant.apply_damage(10, BRUTE, def_zone, blocked)
|
||||
occupant.apply_effect(6, STUN)
|
||||
occupant.apply_effect(6, WEAKEN)
|
||||
occupant.apply_effect(6, STUTTER)
|
||||
occupant.apply_damage(10, BRUTE, def_zone)
|
||||
playsound(src.loc, "punch", 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/victim = A
|
||||
def_zone = ran_zone()
|
||||
blocked = victim.run_armor_check(def_zone, "melee")
|
||||
victim.apply_effect(6, STUN, blocked)
|
||||
victim.apply_effect(6, WEAKEN, blocked)
|
||||
victim.apply_effect(6, STUTTER, blocked)
|
||||
victim.apply_damage(10, BRUTE, def_zone, blocked)
|
||||
victim.apply_effect(6, STUN)
|
||||
victim.apply_effect(6, WEAKEN)
|
||||
victim.apply_effect(6, STUTTER)
|
||||
victim.apply_damage(10, BRUTE, def_zone)
|
||||
if(pulling)
|
||||
occupant.visible_message("<span class='danger'>[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!</span>")
|
||||
|
||||
@@ -188,7 +186,7 @@
|
||||
B.set_dir(newdir)
|
||||
bloodiness--
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
/obj/structure/bed/chair/wheelchair/buckle(mob/M as mob, mob/user as mob)
|
||||
if(M == pulling)
|
||||
pulling = null
|
||||
usr.pulledby = null
|
||||
@@ -215,7 +213,7 @@
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr))
|
||||
return FALSE
|
||||
if(buckled_mob)
|
||||
if(buckled)
|
||||
return FALSE
|
||||
visible_message(SPAN_NOTICE("[usr] collapses [src]."))
|
||||
var/obj/item/wheelchair/R = new(get_turf(src))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened || usr.lying || usr.restrained() || usr.buckled)
|
||||
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened || usr.lying || usr.restrained() || usr.buckled_to)
|
||||
return
|
||||
|
||||
if(on)
|
||||
@@ -62,12 +62,13 @@
|
||||
var/datum/powernet/PN = C.powernet
|
||||
flick("echair1", src)
|
||||
spark(src, 12, alldirs)
|
||||
if(buckled_mob && istype(C))
|
||||
if(electrocute_mob(buckled_mob, C, src, 1.25, BP_HEAD))
|
||||
to_chat(buckled_mob, "<span class='danger'>You feel a deep shock course through your body!</span>")
|
||||
if(istype(buckled, /mob/living) && istype(C))
|
||||
var/mob/living/M = buckled
|
||||
if(electrocute_mob(M, C, src, 1.25, BP_HEAD))
|
||||
to_chat(M, "<span class='danger'>You feel a deep shock course through your body!</span>")
|
||||
sleep(1)
|
||||
if(electrocute_mob(buckled_mob, C, src, 1.25, BP_HEAD))
|
||||
buckled_mob.Stun(PN.get_electrocute_damage()*10)
|
||||
if(electrocute_mob(M, C, src, 1.25, BP_HEAD))
|
||||
M.Stun(PN.get_electrocute_damage()*10)
|
||||
visible_message("<span class='danger'>The electric chair goes off!</span>", "<span class='danger'>You hear an electrical discharge!</span>")
|
||||
|
||||
return
|
||||
@@ -418,11 +419,11 @@
|
||||
|
||||
if (do_mob(user, L, 30, needhand = 0))
|
||||
var/bucklestatus = L.bucklecheck(user)
|
||||
if (!bucklestatus)//incase the patient got buckled during the delay
|
||||
if (!bucklestatus)//incase the patient got buckled_to during the delay
|
||||
return
|
||||
if (bucklestatus == 2)
|
||||
var/obj/structure/LB = L.buckled
|
||||
LB.user_unbuckle_mob(user)
|
||||
var/obj/structure/LB = L.buckled_to
|
||||
LB.user_unbuckle(user)
|
||||
|
||||
if (L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
@@ -463,8 +464,8 @@
|
||||
|
||||
if (do_mob(user, H, 30, needhand = 0))
|
||||
if (bucklestatus == 2)
|
||||
var/obj/structure/LB = H.buckled
|
||||
LB.user_unbuckle_mob(user)
|
||||
var/obj/structure/LB = H.buckled_to
|
||||
LB.user_unbuckle(user)
|
||||
if (H.client)
|
||||
H.client.perspective = EYE_PERSPECTIVE
|
||||
H.client.eye = src
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/remote/user_buckle_mob(mob/user)
|
||||
/obj/structure/bed/chair/remote/user_buckle(mob/user)
|
||||
..()
|
||||
var/area/A = get_area(src)
|
||||
if(!A.powered(EQUIP))
|
||||
@@ -52,15 +52,15 @@
|
||||
|
||||
/obj/structure/bed/chair/remote/process()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled)
|
||||
var/area/A = get_area(src)
|
||||
if(!A.powered(EQUIP))
|
||||
user_unbuckle_mob(buckled_mob)
|
||||
user_unbuckle(buckled)
|
||||
|
||||
// Return to our body in the unfortunate event that we get unbuckled while plugged in
|
||||
/obj/structure/bed/chair/remote/user_unbuckle_mob(mob/user)
|
||||
if(buckled_mob)
|
||||
var/mob/M = buckled_mob
|
||||
/obj/structure/bed/chair/remote/user_unbuckle(mob/user)
|
||||
if(buckled)
|
||||
var/mob/M = buckled
|
||||
if(istype(M) && M.vr_mob)
|
||||
M.vr_mob.body_return()
|
||||
cut_overlays()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to exosuits attached to the remote network."
|
||||
remote_network = REMOTE_GENERIC_MECH
|
||||
|
||||
/obj/structure/bed/chair/remote/mech/user_buckle_mob(mob/user)
|
||||
/obj/structure/bed/chair/remote/mech/user_buckle(mob/user)
|
||||
..()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the remote network."
|
||||
remote_network = REMOTE_GENERIC_ROBOT
|
||||
|
||||
/obj/structure/bed/chair/remote/robot/user_buckle_mob(mob/user)
|
||||
/obj/structure/bed/chair/remote/robot/user_buckle(mob/user)
|
||||
..()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -119,8 +119,7 @@
|
||||
to_chat(user, SPAN_NOTICE("[GM.name] needs to be on the urinal."))
|
||||
return
|
||||
user.visible_message(SPAN_DANGER("[user] slams [GM.name] into the [src]!"), SPAN_NOTICE("You slam [GM.name] into the [src]!"))
|
||||
var/blocked = GM.run_armor_check("melee")
|
||||
GM.apply_damage(8, def_zone = BP_HEAD, blocked = blocked, used_weapon = "blunt force")
|
||||
GM.apply_damage(8, def_zone = BP_HEAD, used_weapon = "blunt force")
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN * 1.5)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You need a tighter grip."))
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/obj/item/held_weapon
|
||||
|
||||
/obj/structure/weapon_rack/Initialize()
|
||||
. = ..()
|
||||
if(held_weapon)
|
||||
held_weapon = new held_weapon(src)
|
||||
icon_state = initial(icon_state) + "_[held_weapon.icon_state]"
|
||||
|
||||
@@ -278,22 +278,21 @@
|
||||
qdel(G) //gotta delete it here because if window breaks, it won't get deleted
|
||||
|
||||
var/def_zone = ran_zone(BP_HEAD, 20)
|
||||
var/blocked = M.run_armor_check(def_zone, "melee")
|
||||
switch (state)
|
||||
if(1)
|
||||
M.visible_message(SPAN_WARNING("[user] slams [M] against \the [src]!"))
|
||||
M.apply_damage(7, damtype, def_zone, blocked, src)
|
||||
M.apply_damage(7, damtype, def_zone, used_weapon = src)
|
||||
hit(10)
|
||||
if(2)
|
||||
M.visible_message(SPAN_DANGER("[user] bashes [M] against \the [src]!"))
|
||||
if (prob(50))
|
||||
M.Weaken(1)
|
||||
M.apply_damage(10, damtype, def_zone, blocked, src)
|
||||
M.apply_damage(10, damtype, def_zone, used_weapon = src)
|
||||
hit(25)
|
||||
if(3)
|
||||
M.visible_message(SPAN_DANGER("<big>[user] crushes [M] against \the [src]!</big>"))
|
||||
M.Weaken(5)
|
||||
M.apply_damage(20, damtype, def_zone, blocked, src)
|
||||
M.apply_damage(20, damtype, def_zone, used_weapon = src)
|
||||
hit(50)
|
||||
|
||||
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
|
||||
|
||||
Reference in New Issue
Block a user