|
1112 | 1112 | /mob/living/silicon/robot/Moved() |
1113 | 1113 | . = ..() |
1114 | 1114 | if(module) |
1115 | | - if(module.type == /obj/item/robot_module/robot/janitor) |
| 1115 | + if(module.type == /obj/item/robot_module/robot/janitor || scrubbing) |
1116 | 1116 | var/turf/tile = loc |
1117 | | - if(isturf(tile)) |
| 1117 | + var/datum/matter_synth/water = water_res |
| 1118 | + if(isturf(tile) && ((!scrubbing) || (water && water.use_charge(1)))) |
| 1119 | + //Got a tile to clean, and we use the simple logic, or we check and use water |
1118 | 1120 | tile.clean_blood() |
1119 | 1121 | if (istype(tile, /turf/simulated)) |
1120 | 1122 | var/turf/simulated/S = tile |
|
1144 | 1146 | cleaned_human.clean_blood(1) |
1145 | 1147 | to_chat(cleaned_human, "<font color='red'>[src] cleans your face!</font>") |
1146 | 1148 |
|
1147 | | - if(istype(module_state_1, /obj/item/storage/bag/ore) || istype(module_state_2, /obj/item/storage/bag/ore) || istype(module_state_3, /obj/item/storage/bag/ore)) //Borgs and drones can use their mining bags ~automagically~ if they're deployed in a slot. Only mining bags, as they're optimized for mass use. |
1148 | | - var/obj/item/storage/bag/ore/B = null |
1149 | | - if(istype(module_state_1, /obj/item/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple. |
1150 | | - B = module_state_1 |
1151 | | - else if(istype(module_state_2, /obj/item/storage/bag/ore)) |
1152 | | - B = module_state_2 |
1153 | | - else if(istype(module_state_3, /obj/item/storage/bag/ore)) |
1154 | | - B = module_state_3 |
1155 | | - var/turf/tile = loc |
1156 | | - if(isturf(tile)) |
1157 | | - B.obj_storage.interacted_mass_pickup(new /datum/event_args/actor(src), tile) |
1158 | | - return |
1159 | | - |
1160 | | - if(scrubbing) |
1161 | | - var/datum/matter_synth/water = water_res |
1162 | | - if(water && water.energy >= 1) |
1163 | | - var/turf/tile = loc |
1164 | | - if(isturf(tile)) |
1165 | | - water.use_charge(1) |
1166 | | - tile.clean_blood() |
1167 | | - if(istype(tile, /turf/simulated)) |
1168 | | - var/turf/simulated/T = tile |
1169 | | - T.dirt = 0 |
1170 | | - for(var/A in tile) |
1171 | | - if(istype(A,/obj/effect/rune) || istype(A,/obj/effect/debris/cleanable) || istype(A,/obj/effect/overlay)) |
1172 | | - qdel(A) |
1173 | | - else if(istype(A, /mob/living/carbon/human)) |
1174 | | - var/mob/living/carbon/human/cleaned_human = A |
1175 | | - if(cleaned_human.lying) |
1176 | | - if(cleaned_human.head) |
1177 | | - cleaned_human.head.clean_blood() |
1178 | | - cleaned_human.update_inv_head(0) |
1179 | | - if(cleaned_human.wear_suit) |
1180 | | - cleaned_human.wear_suit.clean_blood() |
1181 | | - cleaned_human.update_inv_wear_suit(0) |
1182 | | - else if(cleaned_human.w_uniform) |
1183 | | - cleaned_human.w_uniform.clean_blood() |
1184 | | - cleaned_human.update_inv_w_uniform(0) |
1185 | | - if(cleaned_human.shoes) |
1186 | | - cleaned_human.shoes.clean_blood() |
1187 | | - cleaned_human.update_inv_shoes(0) |
1188 | | - cleaned_human.clean_blood(1) |
1189 | | - to_chat(cleaned_human, "<span class='warning'>[src] cleans your face!</span>") |
1190 | | - return |
| 1149 | + //Borgs and drones can use their mining bags ~automagically~ if they're deployed in a slot. Only mining bags, as they're optimized for mass use. |
| 1150 | + var/obj/item/storage/bag/ore/B = null |
| 1151 | + if(istype(module_state_1, /obj/item/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple. |
| 1152 | + B = module_state_1 |
| 1153 | + else if(istype(module_state_2, /obj/item/storage/bag/ore)) |
| 1154 | + B = module_state_2 |
| 1155 | + else if(istype(module_state_3, /obj/item/storage/bag/ore)) |
| 1156 | + B = module_state_3 |
| 1157 | + var/turf/tile = loc |
| 1158 | + if(B && isturf(tile)) |
| 1159 | + B.obj_storage.interacted_mass_pickup(new /datum/event_args/actor(src), tile) |
1191 | 1160 |
|
1192 | 1161 | /mob/living/silicon/robot/proc/self_destruct() |
1193 | 1162 | gib() |
|
0 commit comments