diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 32838765e8..89b96aa24b 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -125,3 +125,10 @@ Proc for attack log creation, because really why not target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]") if(admin) log_attack("[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]") + +//checks whether this item is a module of the robot it is located in. +/proc/is_robot_module(var/obj/item/thing) + if (!thing || !istype(thing.loc, /mob/living/silicon/robot)) + return 0 + var/mob/living/silicon/robot/R = thing.loc + return (thing in R.module.modules) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index a0c78d7572..04c88e47b1 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -281,7 +281,7 @@ emp_act forcesay(hit_appends) //forcesay checks stat already //Melee weapon embedded object code. - if (I && I.damtype == BRUTE && !I.anchored && !I.is_robot_module()) + if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I)) var/damage = effective_force if (armor) damage /= armor+1 @@ -355,7 +355,7 @@ emp_act //thrown weapon embedded object code. if(dtype == BRUTE && istype(O,/obj/item)) var/obj/item/I = O - if (!I.is_robot_module()) + if (!is_robot_module(I)) var/sharp = is_sharp(I) var/damage = throw_damage if (armor) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index ddda239723..40746ff02f 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -287,6 +287,7 @@ src.verbs -= silicon_subsystems /mob/living/silicon/robot/drone/construction + icon_state = "constructiondrone" law_type = /datum/ai_laws/construction_drone module_type = /obj/item/weapon/robot_module/drone/construction can_pull_size = 5 diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 7959aa77c5..12b1fd080b 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -726,10 +726,3 @@ var/global/list/robot_modules = list( LR.Charge(R, amount) ..() return - -//checks whether this item is a module of the robot it is located in. -/obj/item/proc/is_robot_module() - if (!istype(src.loc, /mob/living/silicon/robot)) - return 0 - var/mob/living/silicon/robot/R = src.loc - return (src in R.module.modules) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 3af092f0cc..ab064bead7 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -161,7 +161,7 @@ var/hide_item = !has_edge(W) || !can_slice_here if (hide_item) - if (W.w_class >= src.w_class || W.is_robot_module()) + if (W.w_class >= src.w_class || is_robot_module(W)) return user << "\red You slip [W] inside [src]." diff --git a/icons/mob/robots.dmi b/icons/mob/robots.dmi index b81f428661..e10b6649de 100644 Binary files a/icons/mob/robots.dmi and b/icons/mob/robots.dmi differ