Replaces a bunch of loc assignments with forcemoves and moves to nullspace
This commit is contained in:
committed by
CitadelStationBot
parent
b03e606d35
commit
7f90427a40
@@ -150,7 +150,7 @@
|
||||
/obj/item/roller/robo/deploy_roller(mob/user, atom/location)
|
||||
if(loaded)
|
||||
var/obj/structure/bed/roller/R = loaded
|
||||
R.loc = location
|
||||
R.forceMove(location)
|
||||
user.visible_message("[user] deploys [loaded].", "<span class='notice'>You deploy [loaded].</span>")
|
||||
loaded = null
|
||||
else
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/obj/structure/closet/crate/bin
|
||||
desc = "A trash bin, place your trash here for the janitor to collect."
|
||||
name = "trash bin"
|
||||
@@ -43,3 +44,50 @@
|
||||
spawn(13)
|
||||
playsound(loc, close_sound, 15, 1, -3)
|
||||
update_icon()
|
||||
=======
|
||||
/obj/structure/closet/crate/bin
|
||||
desc = "A trash bin, place your trash here for the janitor to collect."
|
||||
name = "trash bin"
|
||||
icon_state = "largebins"
|
||||
open_sound = 'sound/effects/bin_open.ogg'
|
||||
close_sound = 'sound/effects/bin_close.ogg'
|
||||
anchored = TRUE
|
||||
horizontal = FALSE
|
||||
delivery_icon = null
|
||||
|
||||
/obj/structure/closet/crate/bin/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/bin/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
if(contents.len == 0)
|
||||
add_overlay("largebing")
|
||||
else if(contents.len >= storage_capacity)
|
||||
add_overlay("largebinr")
|
||||
else
|
||||
add_overlay("largebino")
|
||||
|
||||
/obj/structure/closet/crate/bin/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/storage/bag/trash))
|
||||
var/obj/item/storage/bag/trash/T = W
|
||||
to_chat(user, "<span class='notice'>You fill the bag.</span>")
|
||||
for(var/obj/item/O in src)
|
||||
if(T.can_be_inserted(O, 1))
|
||||
O.forceMove(T)
|
||||
T.update_icon()
|
||||
do_animate()
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
anchored = !anchored
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/bin/proc/do_animate()
|
||||
playsound(loc, open_sound, 15, 1, -3)
|
||||
flick("animate_largebins", src)
|
||||
spawn(13)
|
||||
playsound(loc, close_sound, 15, 1, -3)
|
||||
update_icon()
|
||||
>>>>>>> a162837... Replaces a bunch of loc assignments with forcemoves and moves to nullspace (#33465)
|
||||
|
||||
@@ -301,7 +301,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
return
|
||||
if(!ismob(user) || user.lying || user.incapacitated())
|
||||
return
|
||||
O.loc = src.loc
|
||||
O.forceMove(src.loc)
|
||||
if (user != O)
|
||||
visible_message("<span class='warning'>[user] stuffs [O] into [src].</span>")
|
||||
return
|
||||
|
||||
@@ -43,7 +43,7 @@ FLOOR SAFES
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
|
||||
@@ -97,10 +97,10 @@ FLOOR SAFES
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
|
||||
if(!user.canUseTopic(src))
|
||||
return
|
||||
|
||||
|
||||
var/canhear = 0
|
||||
if(user.is_holding_item_of_type(/obj/item/clothing/neck/stethoscope))
|
||||
canhear = 1
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
last_delay = current_tube.enter_delay(src, next_dir)
|
||||
sleep(last_delay)
|
||||
setDir(next_dir)
|
||||
loc = next_loc // When moving from one tube to another, skip collision and such.
|
||||
forceMove(next_loc) // When moving from one tube to another, skip collision and such.
|
||||
density = current_tube.density
|
||||
|
||||
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(I)
|
||||
else
|
||||
I.loc = get_turf(src)
|
||||
I.forceMove(drop_location())
|
||||
to_chat(user, "<span class='notice'>You find [I] in the cistern.</span>")
|
||||
w_items -= I.w_class
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user