From c5b6dfa259344ff81cedc7e2a3ae540fe9dffe84 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Sun, 16 Feb 2020 22:17:19 -0800 Subject: [PATCH 1/7] Fixes mining borg ore box movement astral sorcery --- code/modules/mining/mine_turfs.dm | 9 ---- .../{satchel_ore_boxdm.dm => ore_box.dm} | 20 ++++++- .../modules/mob/living/silicon/robot/robot.dm | 3 ++ .../living/silicon/robot/robot_movement.dm | 53 +++++++++++++++++++ vorestation.dme | 4 ++ 5 files changed, 78 insertions(+), 11 deletions(-) rename code/modules/mining/{satchel_ore_boxdm.dm => ore_box.dm} (68%) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index b006808a1eb..4b20be5ee44 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -124,15 +124,6 @@ turf/simulated/mineral/floor/light_corner if(air_master) air_master.mark_for_update(src) -/turf/simulated/mineral/Entered(atom/movable/M as mob|obj) - . = ..() - if(istype(M,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/R = M - if(R.module) - for(var/obj/item/weapon/storage/bag/ore/O in list(R.module_state_1, R.module_state_2, R.module_state_3)) - attackby(O, R) - return - /turf/simulated/mineral/proc/get_cached_border(var/cache_id, var/direction, var/icon_file, var/icon_state, var/offset = 32) //Cache miss if(!mining_overlay_cache["[cache_id]_[direction]"]) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/ore_box.dm similarity index 68% rename from code/modules/mining/satchel_ore_boxdm.dm rename to code/modules/mining/ore_box.dm index ea62778ec9e..90696abfac7 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/ore_box.dm @@ -1,6 +1,5 @@ /**********************Ore box**************************/ -//Why the hell is this file called satchel_ore_boxdm.dm? -CK /obj/structure/ore_box icon = 'icons/obj/mining.dmi' icon_state = "orebox0" @@ -41,11 +40,15 @@ /obj/structure/ore_box/examine(mob/user) to_chat(user, "That's an [src].") +<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm to_chat(user,desc) // Borgs can now check contents too. if((!istype(user, /mob/living/carbon/human)) && (!istype(user, /mob/living/silicon/robot))) return +======= + to_chat(user, desc) +>>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them. return @@ -70,11 +73,16 @@ set category = "Object" set src in view(1) +<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm if(!istype(usr, /mob/living/carbon/human) && !istype(usr, /mob/living/silicon/robot)) //Only living, intelligent creatures with gripping aparatti can empty ore boxes. to_chat(usr, "You are physically incapable of emptying the ore box.") +======= + if(!ishuman(usr) && !isrobot(usr)) //Only living, intelligent creatures with gripping aparatti can empty ore boxes. + to_chat(usr, "You are physically incapable of emptying the ore box.") +>>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm return - if( usr.stat || usr.restrained() ) + if(usr.stat || usr.restrained()) return if(!Adjacent(usr)) //You can only empty the box if you can physically reach it @@ -84,13 +92,21 @@ add_fingerprint(usr) if(contents.len < 1) +<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm to_chat(usr, "The ore box is empty.") +======= + to_chat(usr, "The ore box is empty.") +>>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm return for (var/obj/item/weapon/ore/O in contents) contents -= O O.loc = src.loc +<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm to_chat(usr, "You empty the ore box.") +======= + to_chat(usr, "You empty the ore box.") +>>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 49a96c63940..51b95579e53 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -903,6 +903,7 @@ /mob/living/silicon/robot/proc/radio_menu() radio.interact(src)//Just use the radio's Topic() instead of bullshit special-snowflake code +<<<<<<< HEAD /mob/living/silicon/robot/Move(a, b, flag) @@ -954,6 +955,8 @@ B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move! return +======= +>>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693) /mob/living/silicon/robot/proc/self_destruct() gib() return diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index f03a51651a3..6d08417a6e2 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -32,3 +32,56 @@ var/datum/robot_component/actuator/A = get_component("actuator") if (cell_use_power(A.active_usage)) return ..() +<<<<<<< HEAD +======= + +/mob/living/silicon/robot/Move(a, b, flag) + + . = ..() + + if(module) + if(module.type == /obj/item/weapon/robot_module/robot/janitor) + var/turf/tile = loc + if(isturf(tile)) + tile.clean_blood() + if (istype(tile, /turf/simulated)) + var/turf/simulated/S = tile + S.dirt = 0 + for(var/A in tile) + if(istype(A, /obj/effect)) + if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay)) + qdel(A) + else if(istype(A, /obj/item)) + var/obj/item/cleaned_item = A + cleaned_item.clean_blood() + else if(istype(A, /mob/living/carbon/human)) + var/mob/living/carbon/human/cleaned_human = A + if(cleaned_human.lying) + if(cleaned_human.head) + cleaned_human.head.clean_blood() + cleaned_human.update_inv_head(0) + if(cleaned_human.wear_suit) + cleaned_human.wear_suit.clean_blood() + cleaned_human.update_inv_wear_suit(0) + else if(cleaned_human.w_uniform) + cleaned_human.w_uniform.clean_blood() + cleaned_human.update_inv_w_uniform(0) + if(cleaned_human.shoes) + cleaned_human.shoes.clean_blood() + cleaned_human.update_inv_shoes(0) + cleaned_human.clean_blood(1) + cleaned_human << "[src] cleans your face!" + + if((module_state_1 && istype(module_state_1, /obj/item/weapon/storage/bag/ore)) || (module_state_2 && istype(module_state_2, /obj/item/weapon/storage/bag/ore)) || (module_state_3 && istype(module_state_3, /obj/item/weapon/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. + var/obj/item/weapon/storage/bag/ore/B = null + if(istype(module_state_1, /obj/item/weapon/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple. + B = module_state_1 + else if(istype(module_state_2, /obj/item/weapon/storage/bag/ore)) + B = module_state_2 + else if(istype(module_state_3, /obj/item/weapon/storage/bag/ore)) + B = module_state_3 + var/turf/tile = loc + if(isturf(tile)) + B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move! + return +>>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693) diff --git a/vorestation.dme b/vorestation.dme index e0e0c6b9b9f..ed2c75ac157 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2161,12 +2161,16 @@ #include "code\modules\mining\mint.dm" #include "code\modules\mining\money_bag.dm" #include "code\modules\mining\ore.dm" +#include "code\modules\mining\ore_box.dm" #include "code\modules\mining\ore_datum.dm" +<<<<<<< HEAD:vorestation.dme #include "code\modules\mining\ore_datum_vr.dm" #include "code\modules\mining\resonator_vr.dm" #include "code\modules\mining\satchel_ore_boxdm.dm" #include "code\modules\mining\shelter_atoms.dm" #include "code\modules\mining\shelters.dm" +======= +>>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):polaris.dme #include "code\modules\mining\drilling\drill.dm" #include "code\modules\mining\drilling\scanner.dm" #include "code\modules\mining\ore_redemption_machine\construction.dm" From 8e7476087d461734d1a00b1a71954dcbc82d4378 Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Mon, 17 Feb 2020 01:28:58 -0500 Subject: [PATCH 2/7] Update vorestation.dme --- vorestation.dme | 3 --- 1 file changed, 3 deletions(-) diff --git a/vorestation.dme b/vorestation.dme index ed2c75ac157..6f9db290d45 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2163,14 +2163,11 @@ #include "code\modules\mining\ore.dm" #include "code\modules\mining\ore_box.dm" #include "code\modules\mining\ore_datum.dm" -<<<<<<< HEAD:vorestation.dme #include "code\modules\mining\ore_datum_vr.dm" #include "code\modules\mining\resonator_vr.dm" #include "code\modules\mining\satchel_ore_boxdm.dm" #include "code\modules\mining\shelter_atoms.dm" #include "code\modules\mining\shelters.dm" -======= ->>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):polaris.dme #include "code\modules\mining\drilling\drill.dm" #include "code\modules\mining\drilling\scanner.dm" #include "code\modules\mining\ore_redemption_machine\construction.dm" From 5ea36b7a60d30416d5fb242e8411f09c61651ec8 Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Mon, 17 Feb 2020 01:29:20 -0500 Subject: [PATCH 3/7] Update robot_movement.dm --- code/modules/mob/living/silicon/robot/robot_movement.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index 6d08417a6e2..858741988e1 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -32,8 +32,6 @@ var/datum/robot_component/actuator/A = get_component("actuator") if (cell_use_power(A.active_usage)) return ..() -<<<<<<< HEAD -======= /mob/living/silicon/robot/Move(a, b, flag) @@ -84,4 +82,3 @@ if(isturf(tile)) B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move! return ->>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693) From e8526a420c7493ddd1fe68b90d19156499a61dfc Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Mon, 17 Feb 2020 01:30:10 -0500 Subject: [PATCH 4/7] Update robot.dm --- .../modules/mob/living/silicon/robot/robot.dm | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 51b95579e53..eee25c04186 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -903,60 +903,6 @@ /mob/living/silicon/robot/proc/radio_menu() radio.interact(src)//Just use the radio's Topic() instead of bullshit special-snowflake code -<<<<<<< HEAD - -/mob/living/silicon/robot/Move(a, b, flag) - - . = ..() - - if(module) - if(module.type == /obj/item/weapon/robot_module/robot/janitor) - var/turf/tile = loc - if(isturf(tile)) - tile.clean_blood() - if (istype(tile, /turf/simulated)) - var/turf/simulated/S = tile - S.dirt = 0 - for(var/A in tile) - if(istype(A, /obj/effect)) - if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay)) - qdel(A) - else if(istype(A, /obj/item)) - var/obj/item/cleaned_item = A - cleaned_item.clean_blood() - else if(istype(A, /mob/living/carbon/human)) - var/mob/living/carbon/human/cleaned_human = A - if(cleaned_human.lying) - if(cleaned_human.head) - cleaned_human.head.clean_blood() - cleaned_human.update_inv_head(0) - if(cleaned_human.wear_suit) - cleaned_human.wear_suit.clean_blood() - cleaned_human.update_inv_wear_suit(0) - else if(cleaned_human.w_uniform) - cleaned_human.w_uniform.clean_blood() - cleaned_human.update_inv_w_uniform(0) - if(cleaned_human.shoes) - cleaned_human.shoes.clean_blood() - cleaned_human.update_inv_shoes(0) - cleaned_human.clean_blood(1) - to_chat(cleaned_human, "[src] cleans your face!") - - if((module_state_1 && istype(module_state_1, /obj/item/weapon/storage/bag/ore)) || (module_state_2 && istype(module_state_2, /obj/item/weapon/storage/bag/ore)) || (module_state_3 && istype(module_state_3, /obj/item/weapon/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. - var/obj/item/weapon/storage/bag/ore/B = null - if(istype(module_state_1, /obj/item/weapon/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple. - B = module_state_1 - else if(istype(module_state_2, /obj/item/weapon/storage/bag/ore)) - B = module_state_2 - else if(istype(module_state_3, /obj/item/weapon/storage/bag/ore)) - B = module_state_3 - var/turf/tile = loc - if(isturf(tile)) - B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move! - return - -======= ->>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693) /mob/living/silicon/robot/proc/self_destruct() gib() return From 332e3271d9c29da24dda7e4aba9190f6eb1f47ef Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Mon, 17 Feb 2020 01:31:48 -0500 Subject: [PATCH 5/7] Update ore_box.dm --- code/modules/mining/ore_box.dm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/code/modules/mining/ore_box.dm b/code/modules/mining/ore_box.dm index 90696abfac7..39c86052f1a 100644 --- a/code/modules/mining/ore_box.dm +++ b/code/modules/mining/ore_box.dm @@ -40,15 +40,11 @@ /obj/structure/ore_box/examine(mob/user) to_chat(user, "That's an [src].") -<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm - to_chat(user,desc) + to_chat(user, desc) // Borgs can now check contents too. if((!istype(user, /mob/living/carbon/human)) && (!istype(user, /mob/living/silicon/robot))) return -======= - to_chat(user, desc) ->>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them. return @@ -116,4 +112,4 @@ O.loc = src.loc O.ex_act(severity++) qdel(src) - return \ No newline at end of file + return From 33570d10e6c6a9efbf115db9486be5378d45e9f6 Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Mon, 17 Feb 2020 01:33:15 -0500 Subject: [PATCH 6/7] Update ore_box.dm --- code/modules/mining/ore_box.dm | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/code/modules/mining/ore_box.dm b/code/modules/mining/ore_box.dm index 39c86052f1a..8a16568e8a9 100644 --- a/code/modules/mining/ore_box.dm +++ b/code/modules/mining/ore_box.dm @@ -42,10 +42,6 @@ to_chat(user, "That's an [src].") to_chat(user, desc) - // Borgs can now check contents too. - if((!istype(user, /mob/living/carbon/human)) && (!istype(user, /mob/living/silicon/robot))) - return - if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them. return @@ -69,13 +65,8 @@ set category = "Object" set src in view(1) -<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm - if(!istype(usr, /mob/living/carbon/human) && !istype(usr, /mob/living/silicon/robot)) //Only living, intelligent creatures with gripping aparatti can empty ore boxes. - to_chat(usr, "You are physically incapable of emptying the ore box.") -======= if(!ishuman(usr) && !isrobot(usr)) //Only living, intelligent creatures with gripping aparatti can empty ore boxes. to_chat(usr, "You are physically incapable of emptying the ore box.") ->>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm return if(usr.stat || usr.restrained()) @@ -88,21 +79,13 @@ add_fingerprint(usr) if(contents.len < 1) -<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm - to_chat(usr, "The ore box is empty.") -======= to_chat(usr, "The ore box is empty.") ->>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm return for (var/obj/item/weapon/ore/O in contents) contents -= O O.loc = src.loc -<<<<<<< HEAD:code/modules/mining/satchel_ore_boxdm.dm - to_chat(usr, "You empty the ore box.") -======= to_chat(usr, "You empty the ore box.") ->>>>>>> a862d55... Fixes mining borg ore box movement on sand with a mining satchel equipped (#6693):code/modules/mining/ore_box.dm return From 4a56ea053f58eded29ebef445470284019f281a6 Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Mon, 17 Feb 2020 01:38:49 -0500 Subject: [PATCH 7/7] Update vorestation.dme --- vorestation.dme | 1 - 1 file changed, 1 deletion(-) diff --git a/vorestation.dme b/vorestation.dme index 6f9db290d45..75cc873c693 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2165,7 +2165,6 @@ #include "code\modules\mining\ore_datum.dm" #include "code\modules\mining\ore_datum_vr.dm" #include "code\modules\mining\resonator_vr.dm" -#include "code\modules\mining\satchel_ore_boxdm.dm" #include "code\modules\mining\shelter_atoms.dm" #include "code\modules\mining\shelters.dm" #include "code\modules\mining\drilling\drill.dm"