mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Merge polaris sync 01 17 2018
Planes, layers, human/update_icon()
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
/obj/structure/bonfire/New(newloc, material_name)
|
||||
..(newloc)
|
||||
if(!material_name)
|
||||
material_name = "wood"
|
||||
material_name = MAT_WOOD
|
||||
material = get_material_by_name("[material_name]")
|
||||
if(!material)
|
||||
qdel(src)
|
||||
@@ -23,14 +23,14 @@
|
||||
|
||||
// Blue wood.
|
||||
/obj/structure/bonfire/sifwood/New(newloc, material_name)
|
||||
..(newloc, "alien wood")
|
||||
..(newloc, MAT_SIFWOOD)
|
||||
|
||||
/obj/structure/bonfire/permanent/New(newloc, material_name)
|
||||
..()
|
||||
ignite()
|
||||
|
||||
/obj/structure/bonfire/permanent/sifwood/New(newloc, material_name)
|
||||
..(newloc, "alien wood")
|
||||
..(newloc, MAT_SIFWOOD)
|
||||
|
||||
/obj/structure/bonfire/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill)
|
||||
@@ -63,7 +63,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/bonfire/attack_hand(mob/user)
|
||||
if(buckled_mob)
|
||||
if(has_buckled_mobs())
|
||||
return ..()
|
||||
|
||||
if(get_fuel_amount())
|
||||
@@ -194,7 +194,7 @@
|
||||
I.appearance_flags = RESET_COLOR
|
||||
overlays += I
|
||||
|
||||
if(buckled_mob && get_fuel_amount() >= 5)
|
||||
if(has_buckled_mobs() && get_fuel_amount() >= 5)
|
||||
I = image(icon, "bonfire_intense")
|
||||
I.pixel_y = 13
|
||||
I.layer = MOB_LAYER + 0.1
|
||||
@@ -231,7 +231,7 @@
|
||||
extinguish()
|
||||
|
||||
/obj/structure/bonfire/post_buckle_mob(mob/living/M)
|
||||
if(buckled_mob) // Just buckled someone
|
||||
if(M.buckled == src) // Just buckled someone
|
||||
M.pixel_y += 13
|
||||
else // Just unbuckled someone
|
||||
M.pixel_y -= 13
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
new /obj/item/device/radio/headset/headset_service(src)
|
||||
new /obj/item/clothing/head/greenbandana(src)
|
||||
new /obj/item/weapon/material/minihoe(src)
|
||||
new /obj/item/weapon/material/hatchet(src)
|
||||
new /obj/item/weapon/material/knife/machete/hatchet(src)
|
||||
new /obj/item/weapon/wirecutters/clippers(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/clothing/suit/storage/hooded/wintercoat/hydro(src)
|
||||
|
||||
@@ -127,12 +127,16 @@
|
||||
else
|
||||
src.toggle(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/AltClick()
|
||||
..()
|
||||
verb_togglelock()
|
||||
|
||||
/obj/structure/closet/secure_closet/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = "Object"
|
||||
set name = "Toggle Lock"
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
|
||||
if(ishuman(usr) || isrobot(usr))
|
||||
|
||||
@@ -59,7 +59,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.has_buckled_mobs())
|
||||
continue
|
||||
O.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
|
||||
#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.2
|
||||
|
||||
/obj/structure/curtain
|
||||
name = "curtain"
|
||||
icon = 'icons/obj/curtain.dmi'
|
||||
|
||||
@@ -64,12 +64,14 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
if(buckled_mob)
|
||||
buckled_mob.burn_skin(85)
|
||||
buckled_mob << "<span class='danger'>You feel a deep shock course through your body!</span>"
|
||||
sleep(1)
|
||||
buckled_mob.burn_skin(85)
|
||||
buckled_mob.Stun(600)
|
||||
if(has_buckled_mobs())
|
||||
for(var/a in buckled_mobs)
|
||||
var/mob/living/L = a
|
||||
L.burn_skin(85)
|
||||
to_chat(L, "<span class='danger'>You feel a deep shock course through your body!</span>")
|
||||
sleep(1)
|
||||
L.burn_skin(85)
|
||||
L.Stun(600)
|
||||
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='danger'>You hear a deep sharp shock!</span>")
|
||||
|
||||
A.power_light = light
|
||||
|
||||
@@ -306,6 +306,7 @@
|
||||
|
||||
/obj/structure/flora/sif/subterranean/initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,2)]"
|
||||
..()
|
||||
|
||||
/obj/structure/flora/sif/eyes
|
||||
name = "mysterious bulbs"
|
||||
@@ -314,44 +315,4 @@
|
||||
|
||||
/obj/structure/flora/sif/eyes/initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
|
||||
// VOREStation Edit Start
|
||||
//Pumpkins
|
||||
/obj/structure/flora/pumpkin
|
||||
name = "pumpkin"
|
||||
icon = 'icons/obj/flora/pumpkins.dmi'
|
||||
desc = "A healthy, fat pumpkin. It looks as if it was freshly plucked from its vines and shows no signs of decay."
|
||||
icon_state = "decor-pumpkin"
|
||||
|
||||
/obj/effect/landmark/carved_pumpkin_spawn
|
||||
name = "jack o'lantern spawn"
|
||||
icon = 'icons/obj/flora/pumpkins.dmi'
|
||||
icon_state = "spawner-jackolantern"
|
||||
|
||||
/obj/effect/landmark/carved_pumpkin_spawn/New()
|
||||
var/new_pumpkin = pick(
|
||||
prob(70);/obj/structure/flora/pumpkin,
|
||||
prob(60);/obj/structure/flora/pumpkin/carved,
|
||||
prob(30);/obj/structure/flora/pumpkin/carved/scream,
|
||||
prob(30);/obj/structure/flora/pumpkin/carved/girly,
|
||||
prob(10);/obj/structure/flora/pumpkin/carved/owo)
|
||||
new new_pumpkin(src.loc)
|
||||
..()
|
||||
|
||||
/obj/structure/flora/pumpkin/carved
|
||||
name = "jack o'lantern"
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has develishly evil-looking eyes and a grinning mouth more than big enough for a very small person to hide in."
|
||||
icon_state = "decor-jackolantern"
|
||||
|
||||
/obj/structure/flora/pumpkin/carved/scream
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has rounded eyes looking in completely opposite directions and a wide mouth, forever frozen in a silent scream. It looks ridiculous, actually."
|
||||
icon_state = "decor-jackolantern-scream"
|
||||
|
||||
/obj/structure/flora/pumpkin/carved/girly
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has neatly rounded eyes topped with what appear to be cartoony eyelashes, completed with what seems to have been the carver's attempt at friendly, toothy smile. The mouth is easily the scariest part of its face."
|
||||
icon_state = "decor-jackolantern-girly"
|
||||
|
||||
/obj/structure/flora/pumpkin/carved/owo
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has large, round eyes and a squiggly, cat-like smiling mouth. Its pleasantly surprised expression seems to suggest that the pumpkin has noticed something about you."
|
||||
icon_state = "decor-jackolantern-owo"
|
||||
// VOREStation Edit End
|
||||
..()
|
||||
@@ -198,5 +198,6 @@
|
||||
|
||||
/obj/structure/flora/tree/sif/update_icon()
|
||||
set_light(5, 1, "#33ccff")
|
||||
overlays.Cut()
|
||||
overlays.Add(image(icon = 'icons/obj/flora/deadtrees.dmi', icon_state = "[icon_state]_glow", layer = LIGHTING_LAYER + 0.1))
|
||||
var/image/glow = image(icon = 'icons/obj/flora/deadtrees.dmi', icon_state = "[icon_state]_glow")
|
||||
glow.plane = PLANE_LIGHTING_ABOVE
|
||||
overlays = list(glow)
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//Pumpkins
|
||||
/obj/structure/flora/pumpkin
|
||||
name = "pumpkin"
|
||||
icon = 'icons/obj/flora/pumpkins.dmi'
|
||||
desc = "A healthy, fat pumpkin. It looks as if it was freshly plucked from its vines and shows no signs of decay."
|
||||
icon_state = "decor-pumpkin"
|
||||
|
||||
/obj/effect/landmark/carved_pumpkin_spawn
|
||||
name = "jack o'lantern spawn"
|
||||
icon = 'icons/obj/flora/pumpkins.dmi'
|
||||
icon_state = "spawner-jackolantern"
|
||||
|
||||
/obj/effect/landmark/carved_pumpkin_spawn/New()
|
||||
var/new_pumpkin = pick(
|
||||
prob(70);/obj/structure/flora/pumpkin,
|
||||
prob(60);/obj/structure/flora/pumpkin/carved,
|
||||
prob(30);/obj/structure/flora/pumpkin/carved/scream,
|
||||
prob(30);/obj/structure/flora/pumpkin/carved/girly,
|
||||
prob(10);/obj/structure/flora/pumpkin/carved/owo)
|
||||
new new_pumpkin(src.loc)
|
||||
..()
|
||||
|
||||
/obj/structure/flora/pumpkin/carved
|
||||
name = "jack o'lantern"
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has develishly evil-looking eyes and a grinning mouth more than big enough for a very small person to hide in."
|
||||
icon_state = "decor-jackolantern"
|
||||
|
||||
/obj/structure/flora/pumpkin/carved/scream
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has rounded eyes looking in completely opposite directions and a wide mouth, forever frozen in a silent scream. It looks ridiculous, actually."
|
||||
icon_state = "decor-jackolantern-scream"
|
||||
|
||||
/obj/structure/flora/pumpkin/carved/girly
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has neatly rounded eyes topped with what appear to be cartoony eyelashes, completed with what seems to have been the carver's attempt at friendly, toothy smile. The mouth is easily the scariest part of its face."
|
||||
icon_state = "decor-jackolantern-girly"
|
||||
|
||||
/obj/structure/flora/pumpkin/carved/owo
|
||||
desc = "A fat, freshly picked pumpkin. This one has a face carved into it! This one has large, round eyes and a squiggly, cat-like smiling mouth. Its pleasantly surprised expression seems to suggest that the pumpkin has noticed something about you."
|
||||
icon_state = "decor-jackolantern-owo"
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cart"
|
||||
anchored = 0
|
||||
density = 1
|
||||
density = 1
|
||||
climbable = 1
|
||||
flags = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
@@ -229,9 +229,11 @@
|
||||
|
||||
/obj/structure/bed/chair/janicart/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = loc
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
if(L.buckled == src)
|
||||
L.loc = loc
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
|
||||
@@ -257,36 +259,41 @@
|
||||
/obj/structure/bed/chair/janicart/set_dir()
|
||||
..()
|
||||
update_layer()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.loc != loc)
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
buckled_mob.buckled = src //Restoring
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
if(L.loc != loc)
|
||||
L.buckled = null //Temporary, so Move() succeeds.
|
||||
L.buckled = src //Restoring
|
||||
|
||||
update_mob()
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/proc/update_mob()
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 7
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 13
|
||||
buckled_mob.pixel_y = 7
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -13
|
||||
buckled_mob.pixel_y = 7
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
L.set_dir(dir)
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
L.pixel_x = 0
|
||||
L.pixel_y = 7
|
||||
if(WEST)
|
||||
L.pixel_x = 13
|
||||
L.pixel_y = 7
|
||||
if(NORTH)
|
||||
L.pixel_x = 0
|
||||
L.pixel_y = 4
|
||||
if(EAST)
|
||||
L.pixel_x = -13
|
||||
L.pixel_y = 7
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(buckled_mob)
|
||||
if(has_buckled_mobs())
|
||||
if(prob(85))
|
||||
return buckled_mob.bullet_act(Proj)
|
||||
var/mob/living/L = pick(buckled_mobs)
|
||||
return L.bullet_act(Proj)
|
||||
visible_message("<span class='warning'>[Proj] ricochets off the [callme]!</span>")
|
||||
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
|
||||
/obj/item/clothing/under/tactical,
|
||||
/obj/item/weapon/beartrap,
|
||||
/obj/item/clothing/suit/storage/vest/press,
|
||||
/obj/item/weapon/material/hatchet/tacknife,
|
||||
/obj/item/weapon/material/knife/tacknife,
|
||||
/obj/item/weapon/material/butterfly/switchblade
|
||||
)
|
||||
|
||||
|
||||
@@ -192,10 +192,10 @@
|
||||
..(newloc, "diamond")
|
||||
|
||||
/obj/structure/simple_door/wood/New(var/newloc,var/material_name)
|
||||
..(newloc, "wood")
|
||||
..(newloc, MAT_WOOD)
|
||||
|
||||
/obj/structure/simple_door/sifwood/New(var/newloc,var/material_name)
|
||||
..(newloc, "alien wood")
|
||||
..(newloc, MAT_SIFWOOD)
|
||||
|
||||
/obj/structure/simple_door/resin/New(var/newloc,var/material_name)
|
||||
..(newloc, "resin")
|
||||
@@ -10,7 +10,7 @@
|
||||
/obj/structure/bed/nest/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob)
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
@@ -20,7 +20,7 @@
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.old_y = 0
|
||||
unbuckle_mob()
|
||||
unbuckle_mob(buckled_mob)
|
||||
else
|
||||
if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME)
|
||||
return
|
||||
@@ -34,7 +34,7 @@
|
||||
buckled_mob.last_special = world.time
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.old_y = 0
|
||||
unbuckle_mob()
|
||||
unbuckle_mob(buckled_mob)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
M.update_canmove()
|
||||
M.pixel_y = 6
|
||||
M.old_y = 6
|
||||
src.buckled_mob = M
|
||||
src.buckled_mobs |= M
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
var/mob/living/affecting = G.affecting
|
||||
if(buckled_mob) //Handles trying to buckle someone else to a chair when someone else is on it
|
||||
if(has_buckled_mobs()) //Handles trying to buckle someone else to a chair when someone else is on it
|
||||
to_chat(user, "<span class='notice'>\The [src] already has someone buckled to it.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [affecting] into \the [src]!</span>")
|
||||
@@ -184,7 +184,7 @@
|
||||
..(newloc,"wood","cotton")
|
||||
|
||||
/obj/structure/bed/double/post_buckle_mob(mob/living/M as mob)
|
||||
if(M == buckled_mob)
|
||||
if(M.buckled == src)
|
||||
M.pixel_y = 13
|
||||
M.old_y = 13
|
||||
else
|
||||
@@ -217,8 +217,9 @@
|
||||
if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
|
||||
return
|
||||
else if(istype(W,/obj/item/roller_holder))
|
||||
if(buckled_mob)
|
||||
user_unbuckle_mob(user)
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
user_unbuckle_mob(A, user)
|
||||
else
|
||||
visible_message("[user] collapses \the [src.name].")
|
||||
new rollertype(get_turf(src))
|
||||
@@ -288,14 +289,15 @@
|
||||
|
||||
/obj/structure/bed/roller/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = src.loc
|
||||
else
|
||||
buckled_mob = null
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
|
||||
if(L.buckled == src)
|
||||
L.loc = src.loc
|
||||
|
||||
/obj/structure/bed/roller/post_buckle_mob(mob/living/M as mob)
|
||||
if(M == buckled_mob)
|
||||
if(M.buckled == src)
|
||||
M.pixel_y = 6
|
||||
M.old_y = 6
|
||||
density = 1
|
||||
@@ -312,7 +314,7 @@
|
||||
..()
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
if(buckled_mob) return 0
|
||||
if(has_buckled_mobs()) return 0
|
||||
visible_message("[usr] collapses \the [src.name].")
|
||||
new rollertype(get_turf(src))
|
||||
spawn(0)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/chair/attack_tk(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(has_buckled_mobs())
|
||||
..()
|
||||
else
|
||||
rotate()
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/structure/bed/chair/update_icon()
|
||||
..()
|
||||
if(buckled_mob && padding_material)
|
||||
if(has_buckled_mobs() && padding_material)
|
||||
var/cache_key = "[base_icon]-armrest-[padding_material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
@@ -61,8 +61,10 @@
|
||||
/obj/structure/bed/chair/set_dir()
|
||||
..()
|
||||
update_layer()
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
L.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/verb/rotate()
|
||||
set name = "Rotate Chair"
|
||||
@@ -137,45 +139,47 @@
|
||||
|
||||
/obj/structure/bed/chair/office/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
occupant.buckled = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle_mob()
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/occupant = A
|
||||
occupant.buckled = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle_mob()
|
||||
|
||||
/obj/structure/bed/chair/office/Bump(atom/A)
|
||||
..()
|
||||
if(!buckled_mob) return
|
||||
if(!has_buckled_mobs()) return
|
||||
|
||||
if(propelled)
|
||||
var/mob/living/occupant = unbuckle_mob()
|
||||
for(var/a in buckled_mobs)
|
||||
var/mob/living/occupant = unbuckle_mob(a)
|
||||
|
||||
var/def_zone = ran_zone()
|
||||
var/blocked = occupant.run_armor_check(def_zone, "melee")
|
||||
var/soaked = occupant.get_armor_soak(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, soaked)
|
||||
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/victim = A
|
||||
def_zone = ran_zone()
|
||||
blocked = victim.run_armor_check(def_zone, "melee")
|
||||
soaked = victim.get_armor_soak(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, soaked)
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
var/def_zone = ran_zone()
|
||||
var/blocked = occupant.run_armor_check(def_zone, "melee")
|
||||
var/soaked = occupant.get_armor_soak(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, soaked)
|
||||
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/victim = A
|
||||
def_zone = ran_zone()
|
||||
blocked = victim.run_armor_check(def_zone, "melee")
|
||||
soaked = victim.get_armor_soak(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, soaked)
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/bed/chair/office/light
|
||||
icon_state = "officechair_white"
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
overlays = null
|
||||
var/image/O = image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||
overlays += O
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
L.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
|
||||
@@ -33,7 +35,7 @@
|
||||
user.pulledby = null
|
||||
user << "<span class='warning'>You lost your grip!</span>"
|
||||
return
|
||||
if(buckled_mob && pulling && user == buckled_mob)
|
||||
if(has_buckled_mobs() && pulling && user in buckled_mobs)
|
||||
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
@@ -51,7 +53,7 @@
|
||||
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
|
||||
user << "<span class='warning'>You cannot go there.</span>"
|
||||
return
|
||||
if(pulling && buckled_mob && (buckled_mob == user))
|
||||
if(pulling && has_buckled_mobs() && (user in buckled_mobs))
|
||||
user << "<span class='warning'>You cannot drive while being pushed.</span>"
|
||||
return
|
||||
|
||||
@@ -59,10 +61,12 @@
|
||||
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(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
L.buckled = null
|
||||
step(L, direction)
|
||||
L.buckled = src
|
||||
//--2----Move driver----2--//
|
||||
if(pulling)
|
||||
T = pulling.loc
|
||||
@@ -70,8 +74,9 @@
|
||||
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(has_buckled_mobs()) // Make sure it stays beneath the occupant
|
||||
var/mob/living/L = buckled_mobs[1]
|
||||
Move(L.loc)
|
||||
set_dir(direction)
|
||||
if(pulling) // Driver
|
||||
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
|
||||
@@ -88,38 +93,41 @@
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
if(!driving)
|
||||
occupant.buckled = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle_mob()
|
||||
if (pulling && (get_dist(src, pulling) > 1))
|
||||
pulling.pulledby = null
|
||||
pulling << "<span class='warning'>You lost your grip!</span>"
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/occupant = A
|
||||
if(!driving)
|
||||
occupant.buckled = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle_mob()
|
||||
if (pulling && (get_dist(src, pulling) > 1))
|
||||
pulling.pulledby = null
|
||||
pulling << "<span class='warning'>You lost your grip!</span>"
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||
if (pulling)
|
||||
MouseDrop(usr)
|
||||
else
|
||||
user_unbuckle_mob(user)
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
user_unbuckle_mob(A, 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(has_buckled_mobs() && user in buckled_mobs)
|
||||
user << "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>"
|
||||
return
|
||||
if(!pulling)
|
||||
@@ -137,7 +145,7 @@
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/Bump(atom/A)
|
||||
..()
|
||||
if(!buckled_mob) return
|
||||
if(!has_buckled_mobs()) return
|
||||
|
||||
if(propelled || (pulling && (pulling.a_intent == I_HURT)))
|
||||
var/mob/living/occupant = unbuckle_mob()
|
||||
@@ -213,7 +221,7 @@
|
||||
..()
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
if(buckled_mob) return 0
|
||||
if(has_buckled_mobs()) return 0
|
||||
visible_message("[usr] collapses \the [src.name].")
|
||||
var/obj/item/wheelchair/R = new/obj/item/wheelchair(get_turf(src))
|
||||
R.name = src.name
|
||||
|
||||
Reference in New Issue
Block a user