mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Merge pull request #15899 from phil235/ResistandGrabFixes
Fixes being able to resist while dead.
This commit is contained in:
+1
-1
@@ -380,7 +380,7 @@ var/list/blood_splatter_icons = list()
|
||||
|
||||
/atom/proc/clear_reagents_to_vomit_pool(mob/living/carbon/M, obj/effect/decal/cleanable/vomit/V)
|
||||
M.reagents.trans_to(V, M.reagents.total_volume / 10)
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //clears the stomach of anything that might be digested as food
|
||||
for(var/datum/reagent/R in M.reagents.reagent_list) //clears the stomach of anything that might be digested as food
|
||||
if(istype(R, /datum/reagent/consumable))
|
||||
var/datum/reagent/consumable/nutri_check = R
|
||||
if(nutri_check.nutriment_factor >0)
|
||||
|
||||
@@ -340,3 +340,7 @@
|
||||
dense_object_backup = AM
|
||||
break
|
||||
. = dense_object_backup
|
||||
|
||||
//called when a mob resists while inside a container that is itself inside something.
|
||||
/atom/movable/proc/relay_container_resist(mob/living/user, obj/O)
|
||||
return
|
||||
|
||||
@@ -156,3 +156,15 @@
|
||||
step_in = 5
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)
|
||||
|
||||
/obj/mecha/working/ripley/relay_container_resist(mob/living/user, obj/O)
|
||||
user << "<span class='notice'>You lean on the back of [O] and start pushing so it falls out of [src].</span>"
|
||||
if(do_after(user, 300, target = O))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
|
||||
return
|
||||
user << "<span class='notice'>You successfully pushed [O] out of [src]!</span>"
|
||||
O.loc = loc
|
||||
cargo -= O
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
user << "<span class='warning'>You fail to push [O] out of [src]!</span>"
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
|
||||
|
||||
/*
|
||||
* Wrapping Paper
|
||||
*/
|
||||
|
||||
/obj/item/stack/wrapping_paper
|
||||
name = "wrapping paper"
|
||||
desc = "Wrap packages with this festive paper to make gifts."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "wrap_paper"
|
||||
flags = NOBLUDGEON
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/item/stack/wrapping_paper/Destroy()
|
||||
if(!amount)
|
||||
new /obj/item/weapon/c_tube(get_turf(src))
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Package Wrap
|
||||
*/
|
||||
|
||||
/obj/item/stack/packageWrap
|
||||
name = "package wrapper"
|
||||
desc = "You can use this to wrap items in."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "deliveryPaper"
|
||||
flags = NOBLUDGEON
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/item/proc/can_be_package_wrapped() //can the item be wrapped with package wrapper into a delivery package
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/storage/can_be_package_wrapped()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/storage/box/can_be_package_wrapped()
|
||||
return 1
|
||||
|
||||
/obj/item/smallDelivery/can_be_package_wrapped()
|
||||
return 0
|
||||
|
||||
/obj/item/stack/packageWrap/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!istype(target))
|
||||
return
|
||||
if(target.anchored)
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item))
|
||||
var/obj/item/I = target
|
||||
if(!I.can_be_package_wrapped())
|
||||
return
|
||||
if(user.r_hand == I || user.l_hand == I)
|
||||
if(!user.unEquip(I))
|
||||
return
|
||||
else if(!isturf(I.loc))
|
||||
return
|
||||
if(use(1))
|
||||
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(I.loc))
|
||||
user.put_in_hands(P)
|
||||
I.loc = P
|
||||
var/size = round(I.w_class)
|
||||
P.w_class = size
|
||||
size = min(size, 5)
|
||||
P.icon_state = "deliverypackage[size]"
|
||||
P.add_fingerprint(user)
|
||||
I.add_fingerprint(user)
|
||||
|
||||
else if(istype (target, /obj/structure/closet))
|
||||
var/obj/structure/closet/O = target
|
||||
if(O.opened)
|
||||
return
|
||||
if(!O.density) //can't wrap non dense closets (e.g. body bags)
|
||||
user << "<span class='warning'>You can't wrap this!</span>"
|
||||
return
|
||||
if(use(3))
|
||||
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
|
||||
if(O.horizontal)
|
||||
P.icon_state = "deliverycrate"
|
||||
O.loc = P
|
||||
P.add_fingerprint(user)
|
||||
O.add_fingerprint(user)
|
||||
else
|
||||
user << "<span class='warning'>You need more paper!</span>"
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] wraps [target].</span>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [name] on [target]</font>")
|
||||
|
||||
/obj/item/stack/packageWrap/Destroy()
|
||||
if(!amount)
|
||||
new /obj/item/weapon/c_tube(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/c_tube
|
||||
name = "cardboard tube"
|
||||
desc = "A tube... of cardboard."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "c_tube"
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
-17
@@ -80,20 +80,3 @@
|
||||
I.add_fingerprint(M)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Wrapping Paper
|
||||
*/
|
||||
/obj/item/stack/wrapping_paper
|
||||
name = "wrapping paper"
|
||||
desc = "You can use this to wrap items in."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "wrap_paper"
|
||||
flags = NOBLUDGEON
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/item/stack/wrapping_paper/attack_self(mob/user)
|
||||
user << "<span class='warning'>You need to use it on a package that has already been wrapped!</span>"
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W, mob/user, params)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Backpack Types
|
||||
|
||||
@@ -205,4 +205,4 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "
|
||||
|
||||
/obj/item/weapon/storage/book/bible/attackby(obj/item/weapon/W, mob/user, params)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
/obj/item/weapon/storage/box/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/packageWrap))
|
||||
return 0
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/survival
|
||||
@@ -95,7 +95,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/masks
|
||||
name = "box of sterile masks"
|
||||
desc = "This box contains sterile medical masks."
|
||||
@@ -105,7 +105,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/syringes
|
||||
name = "box of syringes"
|
||||
desc = "A box full of syringes."
|
||||
@@ -116,7 +116,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/syringe( src )
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/medipens
|
||||
name = "box of medipens"
|
||||
desc = "A box full of epinephrine MediPens."
|
||||
@@ -126,7 +126,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen( src )
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/medipens/utility
|
||||
name = "stimpack value kit"
|
||||
desc = "A box with several stimpack medipens for the economical miner."
|
||||
@@ -136,7 +136,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/beakers
|
||||
name = "box of beakers"
|
||||
icon_state = "beaker"
|
||||
@@ -145,7 +145,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/injectors
|
||||
name = "box of DNA injectors"
|
||||
desc = "This box contains injectors it seems."
|
||||
@@ -156,7 +156,7 @@
|
||||
new /obj/item/weapon/dnainjector/h2m(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/dnainjector/m2h(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/flashbangs
|
||||
name = "box of flashbangs (WARNING)"
|
||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
||||
@@ -166,7 +166,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/flashes
|
||||
name = "box of flashbulbs"
|
||||
desc = "<B>WARNING: Flashes can cause serious eye damage, protective eyewear is required.</B>"
|
||||
@@ -176,7 +176,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/device/assembly/flash/handheld(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/teargas
|
||||
name = "box of tear gas grenades (WARNING)"
|
||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness and skin irritation.</B>"
|
||||
@@ -186,7 +186,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/grenade/chem_grenade/teargas(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/emps
|
||||
name = "box of emp grenades"
|
||||
desc = "A box with 5 emp grenades."
|
||||
@@ -196,7 +196,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/weapon/grenade/empgrenade(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/trackimp
|
||||
name = "boxed tracking implant kit"
|
||||
desc = "Box full of scum-bag tracking utensils."
|
||||
@@ -242,7 +242,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/drinkingglasses
|
||||
name = "box of drinking glasses"
|
||||
desc = "It has a picture of drinking glasses on it."
|
||||
@@ -251,7 +251,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/condimentbottles
|
||||
name = "box of condiment bottles"
|
||||
desc = "It has a large ketchup smear on it."
|
||||
@@ -269,7 +269,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/donkpockets
|
||||
name = "box of donk-pockets"
|
||||
desc = "<B>Instructions:</B> <I>Heat in microwave. Product will cool if not eaten within seven minutes.</I>"
|
||||
@@ -314,7 +314,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/card/id(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/silver_ids
|
||||
name = "box of spare silver IDs"
|
||||
desc = "Shiny IDs for important people."
|
||||
@@ -360,7 +360,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/device/firing_pin(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/handcuffs
|
||||
name = "box of spare handcuffs"
|
||||
desc = "A box full of handcuffs."
|
||||
@@ -370,7 +370,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/restraints/handcuffs(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/zipties
|
||||
name = "box of spare zipties"
|
||||
desc = "A box full of zipties."
|
||||
@@ -380,7 +380,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/alienhandcuffs
|
||||
name = "box of spare handcuffs"
|
||||
desc = "A box full of handcuffs."
|
||||
@@ -390,7 +390,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/restraints/handcuffs/alien(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/fakesyndiesuit
|
||||
name = "boxed space suit and helmet"
|
||||
desc = "A sleek, sturdy box used to hold replica spacesuits."
|
||||
@@ -410,7 +410,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/device/assembly/mousetrap( src )
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/pillbottles
|
||||
name = "box of pill bottles"
|
||||
desc = "It has pictures of pill bottles on its front."
|
||||
@@ -420,7 +420,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/storage/pill_bottle( src )
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/snappops
|
||||
name = "snap pop box"
|
||||
desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children."
|
||||
@@ -453,7 +453,6 @@
|
||||
/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/match/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/match))
|
||||
W.matchignite()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/lights
|
||||
name = "box of replacement bulbs"
|
||||
@@ -501,7 +500,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/clothing/tie/armband/deputy(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/metalfoam
|
||||
name = "box of metal foam grenades"
|
||||
desc = "To be used to rapidly seal hull breaches"
|
||||
@@ -511,7 +510,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/grenade/chem_grenade/metalfoam(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/hug
|
||||
name = "box of hugs"
|
||||
desc = "A special box for sensitive people."
|
||||
@@ -546,7 +545,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/ammo_casing/shotgun/rubbershot(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/lethalshot
|
||||
name = "box of lethal shotgun shots"
|
||||
desc = "A box full of lethal shots, designed for riot shotguns."
|
||||
|
||||
@@ -36,10 +36,9 @@
|
||||
user << "<span class='danger'>Access Denied.</span>"
|
||||
return
|
||||
if(!locked)
|
||||
..()
|
||||
return ..()
|
||||
else
|
||||
user << "<span class='danger'>It's locked!</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/lockbox/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/secure/emag_act(mob/user)
|
||||
if(locked)
|
||||
|
||||
@@ -266,10 +266,12 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc))
|
||||
if(user.stat || !isturf(loc) || !isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
if(!open())
|
||||
container_resist()
|
||||
if(L.last_special <= world.time)
|
||||
container_resist(L)
|
||||
if(world.time > lastbang+5)
|
||||
lastbang = world.time
|
||||
for(var/mob/M in get_hearers_in_view(src, null))
|
||||
@@ -310,16 +312,25 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/container_resist(mob/living/user)
|
||||
if(opened || (!welded && !locked && !istype(loc, /obj/mecha)))
|
||||
return //Door's open, not locked or welded or inside a mech, no point in resisting.
|
||||
if(opened)
|
||||
return
|
||||
if(istype(loc, /atom/movable))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
AM.relay_container_resist(user, src)
|
||||
return
|
||||
if(!welded && !locked)
|
||||
open()
|
||||
return
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>",
|
||||
"<span class='notice'>You lean on the back of [src] and start pushing the door open.</span>")
|
||||
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open.</span>"
|
||||
visible_message("<span class='warning'>[src] begins to shake violently!</span>")
|
||||
if(do_after(user,(breakout_time * 60 * 10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded && !istype(loc, /obj/mecha)) )
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
welded = 0 //applies to all lockers lockers
|
||||
@@ -327,14 +338,10 @@
|
||||
broken = 1 //applies to secure lockers only
|
||||
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>",
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
if(istype(loc, /obj/structure/bigDelivery))
|
||||
var/obj/structure/bigDelivery/D = loc
|
||||
qdel(D)
|
||||
else if(istype(loc, /obj/mecha))
|
||||
loc = get_turf(loc)
|
||||
open()
|
||||
else
|
||||
user << "<span class='warning'>You fail to break out of [src]!</span>"
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
user << "<span class='warning'>You fail to break out of [src]!</span>"
|
||||
|
||||
/obj/structure/closet/AltClick(mob/user)
|
||||
..()
|
||||
|
||||
@@ -123,16 +123,16 @@
|
||||
set name = "Customize SNPC"
|
||||
set desc = "Customise the SNPC"
|
||||
set category = "Admin"
|
||||
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
|
||||
if(A)
|
||||
if(!istype(A,/mob/living/carbon/human/interactive))
|
||||
return
|
||||
var/mob/living/carbon/human/interactive/T = A
|
||||
var/cjob = input("Choose Job") as null|anything in SSjob.occupations.Copy()
|
||||
|
||||
|
||||
if(cjob)
|
||||
T.myjob = cjob
|
||||
T.job = T.myjob.title
|
||||
@@ -142,7 +142,7 @@
|
||||
T.myjob.equip(T)
|
||||
T.myjob.apply_fingerprints(T)
|
||||
T.doSetup()
|
||||
|
||||
|
||||
var/doTele = input("Place the SNPC in their department?") as null|anything in list("Yes","No")
|
||||
if(doTele)
|
||||
if(doTele == "Yes")
|
||||
@@ -451,8 +451,9 @@
|
||||
update_icons()
|
||||
update_hands = 0
|
||||
|
||||
if(grabbed_by.len > 0)
|
||||
for(var/obj/item/weapon/grab/G in grabbed_by)
|
||||
if(grabbed_by.len)
|
||||
for(var/X in grabbed_by)
|
||||
var/obj/item/weapon/grab/G = X
|
||||
if(Adjacent(G))
|
||||
a_intent = "disarm"
|
||||
G.assailant.attack_hand(src)
|
||||
|
||||
@@ -86,17 +86,21 @@ Sorry Giacom. Please don't be mad :(
|
||||
if(now_pushing)
|
||||
return 1
|
||||
|
||||
//BubbleWrap: Should stop you pushing a restrained person out of the way
|
||||
if(istype(M, /mob/living))
|
||||
for(var/mob/MM in range(1,M))
|
||||
if( ((MM.pulling == M && ( M.restrained() && !( MM.restrained() ) && MM.stat == CONSCIOUS)) || locate(/obj/item/weapon/grab, M.grabbed_by.len)) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "<span class='warning'>[M] is restrained, you cannot push past.</span>"
|
||||
return 1
|
||||
if( M.pulling == MM && ( MM.restrained() && !( M.restrained() ) && M.stat == CONSCIOUS) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "<span class='warning'>[M] is restraining [MM], you cannot push past.</span>"
|
||||
return 1
|
||||
//Should stop you pushing a restrained person out of the way
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
if((L.pulledby && L.restrained()) || L.grabbed_by.len)
|
||||
if(!(world.time % 5))
|
||||
src << "<span class='warning'>[L] is restrained, you cannot push past.</span>"
|
||||
return 1
|
||||
|
||||
if(L.pulling)
|
||||
if(ismob(L.pulling))
|
||||
var/mob/P = L.pulling
|
||||
if(P.restrained())
|
||||
if(!(world.time % 5))
|
||||
src << "<span class='warning'>[L] is restraining [P], you cannot push past.</span>"
|
||||
return 1
|
||||
|
||||
//switch our position with M
|
||||
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
@@ -502,6 +506,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
ExtinguishMob()
|
||||
fire_stacks = 0
|
||||
updatehealth()
|
||||
update_canmove()
|
||||
|
||||
|
||||
//proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again)
|
||||
@@ -570,18 +575,17 @@ Sorry Giacom. Please don't be mad :(
|
||||
if ((get_dist(src, pulling) > 1 || diag))
|
||||
if (isliving(pulling))
|
||||
var/mob/living/M = pulling
|
||||
var/ok = 1
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by))
|
||||
var/pull_ok = 1
|
||||
if (M.grabbed_by.len)
|
||||
if (prob(75))
|
||||
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
|
||||
if (istype(G, /obj/item/weapon/grab))
|
||||
visible_message("<span class='danger'>[src] has pulled [G.affecting] from [G.assailant]'s grip.</span>")
|
||||
qdel(G)
|
||||
visible_message("<span class='danger'>[src] has pulled [G.affecting] from [G.assailant]'s grip.</span>")
|
||||
qdel(G)
|
||||
else
|
||||
ok = 0
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
pull_ok = 0
|
||||
if (M.grabbed_by.len)
|
||||
pull_ok = 0
|
||||
if (pull_ok)
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
|
||||
@@ -652,17 +656,18 @@ Sorry Giacom. Please don't be mad :(
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!isliving(src) || next_move > world.time)
|
||||
if(!isliving(src) || next_move > world.time || stat || weakened || stunned || paralysis)
|
||||
return
|
||||
changeNext_move(CLICK_CD_RESIST)
|
||||
|
||||
//resisting grabs (as if it helps anyone...)
|
||||
if(!stat && canmove && !restrained())
|
||||
if(canmove && !restrained())
|
||||
var/resisting = 0
|
||||
for(var/obj/O in requests)
|
||||
qdel(O)
|
||||
resisting++
|
||||
for(var/obj/item/weapon/grab/G in grabbed_by)
|
||||
for(var/X in grabbed_by)
|
||||
var/obj/item/weapon/grab/G = X
|
||||
resisting++
|
||||
if(G.state == GRAB_PASSIVE)
|
||||
qdel(G)
|
||||
@@ -685,10 +690,9 @@ Sorry Giacom. Please don't be mad :(
|
||||
resist_buckle()
|
||||
|
||||
//Breaking out of a container (Locker, sleeper, cryo...)
|
||||
else if(loc && istype(loc, /obj) && !isturf(loc))
|
||||
if(stat == CONSCIOUS && !stunned && !weakened && !paralysis)
|
||||
var/obj/C = loc
|
||||
C.container_resist(src)
|
||||
else if(isobj(loc))
|
||||
var/obj/C = loc
|
||||
C.container_resist(src)
|
||||
|
||||
else if(canmove)
|
||||
if(on_fire)
|
||||
|
||||
@@ -88,7 +88,8 @@
|
||||
affecting.hand = 1
|
||||
affecting.drop_item()
|
||||
affecting.hand = h
|
||||
for(var/obj/item/weapon/grab/G in affecting.grabbed_by)
|
||||
for(var/X in affecting.grabbed_by)
|
||||
var/obj/item/weapon/grab/G = X
|
||||
if(G == src) continue
|
||||
if(G.state == GRAB_AGGRESSIVE)
|
||||
allow_upgrade = 0
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
///Called by client/Move()
|
||||
///Checks to see if you are being grabbed and if so attemps to break it
|
||||
/client/proc/Process_Grab()
|
||||
if(locate(/obj/item/weapon/grab, locate(/obj/item/weapon/grab, mob.grabbed_by.len)))
|
||||
if(mob.grabbed_by.len)
|
||||
var/list/grabbing = list()
|
||||
|
||||
if(istype(mob.l_hand, /obj/item/weapon/grab))
|
||||
@@ -218,26 +218,29 @@
|
||||
var/obj/item/weapon/grab/G = mob.r_hand
|
||||
grabbing += G.affecting
|
||||
|
||||
for(var/obj/item/weapon/grab/G in mob.grabbed_by)
|
||||
if(G.state == GRAB_PASSIVE && !grabbing.Find(G.assailant))
|
||||
qdel(G)
|
||||
for(var/X in mob.grabbed_by)
|
||||
var/obj/item/weapon/grab/G = X
|
||||
switch(G.state)
|
||||
|
||||
if(G.state == GRAB_AGGRESSIVE)
|
||||
move_delay = world.time + 10
|
||||
if(!prob(25))
|
||||
return 1
|
||||
mob.visible_message("<span class='warning'>[mob] has broken free of [G.assailant]'s grip!</span>")
|
||||
qdel(G)
|
||||
if(GRAB_PASSIVE)
|
||||
if(!grabbing.Find(G.assailant)) //moving always breaks a passive grab unless we are also grabbing our grabber.
|
||||
qdel(G)
|
||||
|
||||
if(G.state == GRAB_NECK)
|
||||
move_delay = world.time + 10
|
||||
if(!prob(5))
|
||||
return 1
|
||||
mob.visible_message("<span class='warning'>[mob] has broken free of [G.assailant]'s headlock!</span>")
|
||||
qdel(G)
|
||||
if(GRAB_AGGRESSIVE)
|
||||
move_delay = world.time + 10
|
||||
if(!prob(25))
|
||||
return 1
|
||||
mob.visible_message("<span class='warning'>[mob] has broken free of [G.assailant]'s grip!</span>")
|
||||
qdel(G)
|
||||
|
||||
if(GRAB_NECK)
|
||||
move_delay = world.time + 10
|
||||
if(!prob(5))
|
||||
return 1
|
||||
mob.visible_message("<span class='warning'>[mob] has broken free of [G.assailant]'s headlock!</span>")
|
||||
qdel(G)
|
||||
return 0
|
||||
|
||||
|
||||
///Process_Incorpmove
|
||||
///Called by client/Move()
|
||||
///Allows mobs to run though walls
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "deliverycloset"
|
||||
density = 1
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
var/obj/wrapped = null
|
||||
var/giftwrapped = 0
|
||||
var/sortTag = 0
|
||||
|
||||
@@ -15,11 +14,6 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bigDelivery/Destroy()
|
||||
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
|
||||
wrapped.loc = (get_turf(loc))
|
||||
if(istype(wrapped, /obj/structure/closet))
|
||||
var/obj/structure/closet/O = wrapped
|
||||
O.welded = 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.loc = T
|
||||
@@ -48,37 +42,46 @@
|
||||
if(WP.use(3))
|
||||
user.visible_message("[user] wraps the package in festive paper!")
|
||||
giftwrapped = 1
|
||||
if(istype(wrapped, /obj/structure/closet/crate))
|
||||
icon_state = "giftcrate"
|
||||
else
|
||||
icon_state = "giftcloset"
|
||||
if(WP.amount <= 0 && !WP.loc) //if we used our last wrapping paper, drop a cardboard tube
|
||||
new /obj/item/weapon/c_tube( get_turf(user) )
|
||||
icon_state = "gift[icon_state]"
|
||||
else
|
||||
user << "<span class='warning'>You need more paper!</span>"
|
||||
|
||||
/obj/structure/bigDelivery/relay_container_resist(mob/living/user, obj/O)
|
||||
if(istype(loc, /atom/movable))
|
||||
var/atom/movable/AM = loc //can't unwrap the wrapped container if it's inside something.
|
||||
AM.relay_container_resist(user, O)
|
||||
return
|
||||
user << "<span class='notice'>You lean on the back of [O] and start pushing to rip the wrapping around it.</span>"
|
||||
if(do_after(user, 50, target = O))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
|
||||
return
|
||||
user << "<span class='notice'>You successfully removed [O]'s wrapping !</span>"
|
||||
O.loc = loc
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
qdel(src)
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
user << "<span class='warning'>You fail to remove [O]'s wrapping!</span>"
|
||||
|
||||
|
||||
|
||||
/obj/item/smallDelivery
|
||||
name = "small parcel"
|
||||
desc = "A small wrapped package."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "deliverycrateSmall"
|
||||
var/obj/item/wrapped = null
|
||||
icon_state = "deliverypackage3"
|
||||
var/giftwrapped = 0
|
||||
var/sortTag = 0
|
||||
|
||||
|
||||
/obj/item/smallDelivery/attack_self(mob/user)
|
||||
if(wrapped && wrapped.loc) //sometimes items can disappear. For example, bombs. --rastaf0
|
||||
wrapped.loc = user.loc
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(wrapped)
|
||||
else
|
||||
wrapped.loc = get_turf(src)
|
||||
user.unEquip(src)
|
||||
for(var/X in contents)
|
||||
var/atom/movable/AM = X
|
||||
user.put_in_hands(AM)
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/smallDelivery/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/destTagger))
|
||||
var/obj/item/device/destTagger/O = W
|
||||
@@ -100,94 +103,13 @@
|
||||
else if(istype(W, /obj/item/stack/wrapping_paper) && !giftwrapped)
|
||||
var/obj/item/stack/wrapping_paper/WP = W
|
||||
if(WP.use(1))
|
||||
icon_state = "giftcrate[wrapped.w_class]"
|
||||
icon_state = "gift[icon_state]"
|
||||
giftwrapped = 1
|
||||
user.visible_message("[user] wraps the package in festive paper!")
|
||||
if(WP.amount <= 0 && !WP.loc) //if we used our last wrapping paper, drop a cardboard tube
|
||||
new /obj/item/weapon/c_tube( get_turf(user) )
|
||||
else
|
||||
user << "<span class='warning'>You need more paper!</span>"
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/packageWrap
|
||||
name = "package wrapper"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "deliveryPaper"
|
||||
flags = NOBLUDGEON
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
|
||||
/obj/item/stack/packageWrap/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(!istype(target)) //this really shouldn't be necessary (but it is). -Pete
|
||||
return
|
||||
if(istype(target, /obj/item/smallDelivery) || istype(target,/obj/structure/bigDelivery) \
|
||||
|| istype(target, /obj/item/weapon/evidencebag) || istype(target, /obj/structure/closet/body_bag))
|
||||
return
|
||||
if(target.anchored)
|
||||
return
|
||||
if(target in user)
|
||||
return
|
||||
|
||||
|
||||
|
||||
if(istype(target, /obj/item) && !(istype(target, /obj/item/weapon/storage) && !istype(target,/obj/item/weapon/storage/box)))
|
||||
var/obj/item/O = target
|
||||
if(use(1))
|
||||
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(O.loc)) //Aaannd wrap it up!
|
||||
if(!istype(O.loc, /turf))
|
||||
if(user.client)
|
||||
user.client.screen -= O
|
||||
P.wrapped = O
|
||||
O.loc = P
|
||||
var/i = round(O.w_class)
|
||||
if(i in list(1,2,3,4,5))
|
||||
P.icon_state = "deliverycrate[i]"
|
||||
P.w_class = i
|
||||
P.add_fingerprint(usr)
|
||||
O.add_fingerprint(usr)
|
||||
add_fingerprint(usr)
|
||||
else
|
||||
return
|
||||
else if(istype(target, /obj/structure/closet/crate))
|
||||
var/obj/structure/closet/crate/O = target
|
||||
if(O.opened)
|
||||
return
|
||||
if(use(3))
|
||||
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
|
||||
P.icon_state = "deliverycrate"
|
||||
P.wrapped = O
|
||||
O.loc = P
|
||||
else
|
||||
user << "<span class='warning'>You need more paper!</span>"
|
||||
return
|
||||
else if(istype (target, /obj/structure/closet))
|
||||
var/obj/structure/closet/O = target
|
||||
if(O.opened)
|
||||
return
|
||||
if(use(3))
|
||||
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
|
||||
P.wrapped = O
|
||||
O.welded = 1
|
||||
O.loc = P
|
||||
else
|
||||
user << "<span class='warning'>You need more paper!</span>"
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>"
|
||||
return
|
||||
|
||||
user.visible_message("[user] wraps [target].")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [name] on [target]</font>")
|
||||
|
||||
if(amount <= 0 && !src.loc) //if we used our last wrapping paper, drop a cardboard tube
|
||||
new /obj/item/weapon/c_tube( get_turf(user) )
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/destTagger
|
||||
name = "destination tagger"
|
||||
desc = "Used to set the destination of properly wrapped packages."
|
||||
@@ -229,14 +151,3 @@
|
||||
var/n = text2num(href_list["nextTag"])
|
||||
currTag = n
|
||||
openwindow(usr)
|
||||
|
||||
|
||||
/obj/item/weapon/c_tube
|
||||
name = "cardboard tube"
|
||||
desc = "A tube... of cardboard."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "c_tube"
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
+2
-1
@@ -579,6 +579,7 @@
|
||||
#include "code\game\objects\items\stacks\medical.dm"
|
||||
#include "code\game\objects\items\stacks\rods.dm"
|
||||
#include "code\game\objects\items\stacks\stack.dm"
|
||||
#include "code\game\objects\items\stacks\wrap.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\glass.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\leather.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\light.dm"
|
||||
@@ -602,7 +603,7 @@
|
||||
#include "code\game\objects\items\weapons\explosives.dm"
|
||||
#include "code\game\objects\items\weapons\extinguisher.dm"
|
||||
#include "code\game\objects\items\weapons\flamethrower.dm"
|
||||
#include "code\game\objects\items\weapons\gift_wrappaper.dm"
|
||||
#include "code\game\objects\items\weapons\gift.dm"
|
||||
#include "code\game\objects\items\weapons\handcuffs.dm"
|
||||
#include "code\game\objects\items\weapons\holosign_creator.dm"
|
||||
#include "code\game\objects\items\weapons\holy_weapons.dm"
|
||||
|
||||
Reference in New Issue
Block a user