mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Cleanbot/dirt fix.
Now if a cleanbot cleans a tile, it will also set it's dirt value to 0 so a person walking back over the tile won't instantly create more dirt. Conflicts: code/game/machinery/bots/cleanbot.dm
This commit is contained in:
@@ -54,8 +54,8 @@
|
||||
src.botcard = new /obj/item/weapon/card/id(src)
|
||||
var/datum/job/janitor/J = new/datum/job/janitor
|
||||
src.botcard.access = J.get_access()
|
||||
|
||||
src.locked = 0 // Start unlocked so roboticist can set them to patrol.
|
||||
|
||||
src.locked = 0 // Start unlocked so roboticist can set them to patrol.
|
||||
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
|
||||
@@ -311,16 +311,22 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
target_types += /obj/effect/decal/cleanable/dirt
|
||||
|
||||
/obj/machinery/bot/cleanbot/proc/clean(var/obj/effect/decal/cleanable/target)
|
||||
src.anchored = 1
|
||||
src.icon_state = "cleanbot-c"
|
||||
anchored = 1
|
||||
icon_state = "cleanbot-c"
|
||||
visible_message("\red [src] begins to clean up the [target]")
|
||||
src.cleaning = 1
|
||||
spawn(50)
|
||||
src.cleaning = 0
|
||||
cleaning = 1
|
||||
var/cleantime = 50
|
||||
if(istype(target,/obj/effect/decal/cleanable/dirt)) // Clean Dirt much faster
|
||||
cleantime = 10
|
||||
spawn(cleantime)
|
||||
if(istype(loc,/turf/simulated))
|
||||
var/turf/simulated/f = loc
|
||||
f.dirt = 0
|
||||
cleaning = 0
|
||||
del(target)
|
||||
src.icon_state = "cleanbot[src.on]"
|
||||
src.anchored = 0
|
||||
src.target = null
|
||||
icon_state = "cleanbot[on]"
|
||||
anchored = 0
|
||||
target = null
|
||||
|
||||
/obj/machinery/bot/cleanbot/explode()
|
||||
src.on = 0
|
||||
@@ -358,4 +364,4 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
src.created_name = t
|
||||
src.created_name = t
|
||||
|
||||
Reference in New Issue
Block a user