mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
Merge remote-tracking branch 'upstream/dev' into attack-cleanup2
Conflicts: code/modules/mob/living/simple_animal/friendly/spiderbot.dm code/modules/mob/living/simple_animal/simple_animal.dm
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/breakout = 0 //if someone is currently breaking out. mutex
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
var/storage_capacity = 2 * MOB_MEDIUM //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
//then open it in a populated area to crash clients.
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.ogg'
|
||||
@@ -20,14 +20,12 @@
|
||||
var/store_items = 1
|
||||
var/store_mobs = 1
|
||||
|
||||
var/const/default_mob_size = 15
|
||||
|
||||
/obj/structure/closet/initialize()
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
var/obj/item/I
|
||||
for(I in src.loc)
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
// adjust locker size to hold all items with 5 units of free store room
|
||||
var/content_size = 0
|
||||
for(I in src.contents)
|
||||
@@ -71,13 +69,13 @@
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src)
|
||||
AD.loc = src.loc
|
||||
AD.forceMove(src.loc)
|
||||
|
||||
for(var/obj/I in src)
|
||||
I.loc = src.loc
|
||||
I.forceMove(src.loc)
|
||||
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
M.forceMove(src.loc)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
@@ -125,7 +123,7 @@
|
||||
for(var/obj/effect/dummy/chameleon/AD in src.loc)
|
||||
if((stored_units + added_units) > storage_capacity)
|
||||
break
|
||||
AD.loc = src
|
||||
AD.forceMove(src)
|
||||
added_units++
|
||||
return added_units
|
||||
|
||||
@@ -136,7 +134,7 @@
|
||||
if(stored_units + added_units + item_size > storage_capacity)
|
||||
continue
|
||||
if(!I.anchored)
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
added_units += item_size
|
||||
return added_units
|
||||
|
||||
@@ -145,14 +143,13 @@
|
||||
for(var/mob/living/M in src.loc)
|
||||
if(M.buckled || M.pinned.len)
|
||||
continue
|
||||
var/current_mob_size = (M.mob_size ? M.mob_size : default_mob_size)
|
||||
if(stored_units + added_units + current_mob_size > storage_capacity)
|
||||
if(stored_units + added_units + M.mob_size > storage_capacity)
|
||||
break
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
added_units += current_mob_size
|
||||
M.forceMove(src)
|
||||
added_units += M.mob_size
|
||||
return added_units
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user as mob)
|
||||
@@ -166,19 +163,19 @@
|
||||
switch(severity)
|
||||
if(1)
|
||||
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity++)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity++)
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity++)
|
||||
qdel(src)
|
||||
|
||||
@@ -186,7 +183,7 @@
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
for(var/atom/movable/A in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
@@ -203,7 +200,7 @@
|
||||
/obj/structure/closet/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -233,7 +230,7 @@
|
||||
return
|
||||
usr.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
attack_tk(mob/user as mob)
|
||||
if(localopened && fireaxe)
|
||||
fireaxe.loc = loc
|
||||
fireaxe.forceMove(loc)
|
||||
user << "<span class='notice'>You telekinetically remove the fire axe.</span>"
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
if (W) W.loc = src.loc
|
||||
if (W) W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/card/id))
|
||||
if(src.broken)
|
||||
user << "<span class='warning'>It appears to be broken.</span>"
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
O.loc = get_turf(src)
|
||||
O.forceMove(get_turf(src))
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
var/obj/structure/bed/B = O
|
||||
if(B.buckled_mob)
|
||||
continue
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
icon_state = icon_closed
|
||||
@@ -75,7 +75,7 @@
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -91,7 +91,7 @@
|
||||
if(rigged)
|
||||
user << "<span class='notice'>You attach [W] to [src].</span>"
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(rigged)
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/set_locked(var/newlocked, mob/user = null)
|
||||
if(locked == newlocked) return
|
||||
|
||||
|
||||
locked = newlocked
|
||||
if(user)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
@@ -437,12 +437,12 @@
|
||||
continue
|
||||
if(!S.anchored)
|
||||
found = 1
|
||||
S.loc = src
|
||||
S.forceMove(src)
|
||||
break
|
||||
if(!found)
|
||||
for(var/obj/machinery/M in src.loc)
|
||||
if(!M.anchored)
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
break
|
||||
return
|
||||
|
||||
@@ -465,12 +465,12 @@
|
||||
continue
|
||||
if(!S.anchored)
|
||||
found = 1
|
||||
S.loc = src
|
||||
S.forceMove(src)
|
||||
break
|
||||
if(!found)
|
||||
for(var/obj/machinery/M in src.loc)
|
||||
if(!M.anchored)
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
break
|
||||
return
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(!H.species.is_small)
|
||||
if(!issmall(H))
|
||||
return 0
|
||||
meat_type = H.species.meat_type
|
||||
icon_state = "spikebloody"
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/obj/structure/ladder
|
||||
name = "ladder"
|
||||
desc = "A sturdy metal ladder."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "ladder11"
|
||||
var/id = null
|
||||
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
|
||||
var/obj/structure/ladder/down = null //the ladder below this one
|
||||
var/obj/structure/ladder/up = null //the ladder above this one
|
||||
|
||||
/obj/structure/ladder/New()
|
||||
spawn(8)
|
||||
for(var/obj/structure/ladder/L in world)
|
||||
if(L.id == id)
|
||||
if(L.height == (height - 1))
|
||||
down = L
|
||||
continue
|
||||
if(L.height == (height + 1))
|
||||
up = L
|
||||
continue
|
||||
|
||||
if(up && down) //if both our connections are filled
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/obj/structure/ladder/update_icon()
|
||||
if(up && down)
|
||||
icon_state = "ladder11"
|
||||
|
||||
else if(up)
|
||||
icon_state = "ladder10"
|
||||
|
||||
else if(down)
|
||||
icon_state = "ladder01"
|
||||
|
||||
else //wtf make your ladders properly assholes
|
||||
icon_state = "ladder00"
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user as mob)
|
||||
if(up && down)
|
||||
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
|
||||
if("Up")
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
if("Down")
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
else if(up)
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
|
||||
else if(down)
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -15,6 +15,7 @@
|
||||
pressure_resistance = 15
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_dir = SOUTH
|
||||
buckle_lying = 1
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
@@ -131,14 +132,18 @@
|
||||
remove_padding()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
|
||||
var/obj/item/weapon/grab/G = W
|
||||
var/mob/living/affecting = G.affecting
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [affecting] into \the [src]!</span>")
|
||||
if(do_after(user, 20))
|
||||
W:affecting.loc = loc
|
||||
if(buckle_mob(W:affecting))
|
||||
W:affecting.visible_message(\
|
||||
"<span class='danger'>[W:affecting.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
affecting.loc = loc
|
||||
spawn(0)
|
||||
if(buckle_mob(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='notice'>You hear metal clanking.</span>")
|
||||
qdel(W)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "chair_preview"
|
||||
color = "#666666"
|
||||
base_icon = "chair"
|
||||
buckle_dir = 0
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
set_dir(direction)
|
||||
if(pulling) // Driver
|
||||
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
|
||||
pulling.loc = T
|
||||
pulling.forceMove(T)
|
||||
else
|
||||
spawn(0)
|
||||
if(get_dist(src, pulling) > 1) // We are too far away? Losing control.
|
||||
@@ -107,7 +107,7 @@
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user