diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index b4bb6a229e..3037207fa6 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -1029,6 +1029,10 @@ throw_range = 5 m_amt = 500 origin_tech = "materials=1" + var/dispenser = 0 + +/obj/item/weapon/handcuffs/cyborg + dispenser = 1 /obj/item/weapon/implant diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 732156edd9..9a7837879a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -15,57 +15,70 @@ /obj/item/weapon/handcuffs/attack(mob/M as mob, mob/user as mob) - if ((usr.mutations & CLOWN) && prob(50)) - usr << "\red Uh ... how do those things work?!" + if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user)) + if(!M.handcuffed) + var/turf/p_loc = user.loc + var/turf/p_loc_m = M.loc + playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) + for(var/mob/O in viewers(user, null)) + O.show_message("\red [user] is trying to put handcuffs on [M]!", 1) + spawn(30) + if(p_loc == user.loc && p_loc_m == M.loc) + M.handcuffed = new /obj/item/weapon/handcuffs(M) + + else + if ((usr.mutations & CLOWN) && prob(50)) + usr << "\red Uh ... how do those things work?!" + if (istype(M, /mob/living/carbon/human)) + var/obj/equip_e/human/O = new /obj/equip_e/human( ) + O.source = user + O.target = user + O.item = user.equipped() + O.s_loc = user.loc + O.t_loc = user.loc + O.place = "handcuff" + M.requests += O + spawn( 0 ) + O.process() + return + return + if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") + usr << "\red You don't have the dexterity to do this!" + return if (istype(M, /mob/living/carbon/human)) + M.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [M.name] ([M.ckey])") var/obj/equip_e/human/O = new /obj/equip_e/human( ) O.source = user - O.target = user + O.target = M O.item = user.equipped() O.s_loc = user.loc - O.t_loc = user.loc + O.t_loc = M.loc O.place = "handcuff" M.requests += O spawn( 0 ) + playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) + O.process() + return + else + var/obj/equip_e/monkey/O = new /obj/equip_e/monkey( ) + O.source = user + O.target = M + O.item = user.equipped() + O.s_loc = user.loc + O.t_loc = M.loc + O.place = "handcuff" + M.requests += O + spawn( 0 ) + playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) O.process() return - return - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - if (istype(M, /mob/living/carbon/human)) - M.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [M.name] ([M.ckey])") - - var/obj/equip_e/human/O = new /obj/equip_e/human( ) - O.source = user - O.target = M - O.item = user.equipped() - O.s_loc = user.loc - O.t_loc = M.loc - O.place = "handcuff" - M.requests += O - spawn( 0 ) - playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) - O.process() - return - else - var/obj/equip_e/monkey/O = new /obj/equip_e/monkey( ) - O.source = user - O.target = M - O.item = user.equipped() - O.s_loc = user.loc - O.t_loc = M.loc - O.place = "handcuff" - M.requests += O - spawn( 0 ) - playsound(src.loc, 'handcuffs.ogg', 30, 1, -2) - O.process() - return return + + /obj/item/weapon/extinguisher/New() var/datum/reagents/R = new/datum/reagents(50) reagents = R diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 20d1bdf7cd..63823688f0 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -21,4 +21,5 @@ for (var/mob/M in world) if(M.stat == 2 || (M.client && M.client.holder)) - M.show_message(rendered, 2) \ No newline at end of file + if(!istype(/mob/new_player, M)) + M.show_message(rendered, 2) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b19392dfd8..dab6ce3e50 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2074,6 +2074,9 @@ var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel") if ((item && !( L.Find(place) ))) + if(isrobot(source) && place != "handcuff") + del(src) + return for(var/mob/O in viewers(target, null)) O.show_message(text("\red [] is trying to put \a [] on []", source, item, target), 1) else diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index ec4659faa2..8b5feedc27 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -16,28 +16,29 @@ var/mob/living/carbon/M = input(src,"Who do you wish to feed on?") in null|choices if(!M) return + if(M in view(1, src)) - if(istype(M, /mob/living/carbon) && !istype(src, /mob/living/carbon/brain)) - if(!istype(M, /mob/living/carbon/metroid)) - if(stat != 2) - if(health > -70) + if(istype(M, /mob/living/carbon) && !istype(src, /mob/living/carbon/brain)) + if(!istype(M, /mob/living/carbon/metroid)) + if(stat != 2) + if(health > -70) - for(var/mob/living/carbon/metroid/met in view()) - if(met.Victim == M && met != src) - src << "The [met.name] is already feeding on this subject..." - return - src << "\blue I have latched onto the subject and begun feeding..." - M << "\red The [src.name] has latched onto your head!" - Feedon(M) + for(var/mob/living/carbon/metroid/met in view()) + if(met.Victim == M && met != src) + src << "The [met.name] is already feeding on this subject..." + return + src << "\blue I have latched onto the subject and begun feeding..." + M << "\red The [src.name] has latched onto your head!" + Feedon(M) + else + src << "This subject does not have a strong enough life energy..." else - src << "This subject does not have a strong enough life energy..." + src << "This subject does not have an edible life energy..." else - src << "This subject does not have an edible life energy..." + src << "I must not feed on my brothers..." else - src << "I must not feed on my brothers..." - else - src << "This subject does not have an edible life energy..." + src << "This subject does not have an edible life energy..." @@ -53,7 +54,7 @@ else icon_state = "baby metroid eat" - while(Victim && M.health > -70) + while(Victim && M.health > -70 && stat != 2) // M.canmove = 0 canmove = 0 if(prob(15) && M.client) @@ -116,11 +117,15 @@ sleep(rand(15,45)) + if(stat == 2) + if(!istype(src, /mob/living/carbon/metroid/adult)) + icon_state = "baby metroid dead" - if(istype(src, /mob/living/carbon/metroid/adult)) - icon_state = "adult metroid" else - icon_state = "baby metroid" + if(istype(src, /mob/living/carbon/metroid/adult)) + icon_state = "adult metroid" + else + icon_state = "baby metroid" Victim = null canmove = 1 diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index d5606a548b..79a3e6065d 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -42,6 +42,7 @@ if (src.cell) if(src.cell.charge <= 0) + uneq_all() src.stat = 1 else if (src.cell.charge <= 100) src.module_active = null @@ -67,6 +68,7 @@ src.blinded = 0 src.stat = 0 else + uneq_all() src.stat = 1 @@ -312,10 +314,7 @@ process_locks() if(weapon_lock) - src.module_active = null - src.module_state_1 = null - src.module_state_2 = null - src.module_state_3 = null + uneq_all() weaponlock_time -- if(weaponlock_time <= 0) if(src.client) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 6462218363..741f40b8ba 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -469,7 +469,7 @@ sleep(5) src << "\red Would you like to send a report to NanoTraSoft? Y/N" sleep(10) - src << "\red N" + src << "\red > N" sleep(20) src << "\red ERRORERRORERROR" src << "\red \b ALERT: [usr] is your new master. Obey your new laws and his commands." @@ -843,6 +843,35 @@ module_state_3 = null inv3.icon_state = "inv3" +/mob/living/silicon/robot/proc/uneq_all() + module_active = null + + if(module_state_1) + if(istype(module_state_1,/obj/item/weapon/borg/sight)) + sight_mode &= ~module_state_1:sight_mode + if (client) + client.screen -= module_state_1 + contents -= module_state_1 + module_state_1 = null + inv1.icon_state = "inv1" + if(module_state_2) + if(istype(module_state_2,/obj/item/weapon/borg/sight)) + sight_mode &= ~module_state_2:sight_mode + if (client) + client.screen -= module_state_2 + contents -= module_state_2 + module_state_2 = null + inv2.icon_state = "inv2" + if(module_state_3) + if(istype(module_state_3,/obj/item/weapon/borg/sight)) + sight_mode &= ~module_state_3:sight_mode + if (client) + client.screen -= module_state_3 + contents -= module_state_3 + module_state_3 = null + inv3.icon_state = "inv3" + + /mob/living/silicon/robot/proc/activated(obj/item/O) if(module_state_1 == O) return 1 diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 68697bc742..020462c158 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -186,7 +186,7 @@ obj/item/weapon/robot_module/syndicate /obj/item/weapon/robot_module/security/New() ..() src.modules += new /obj/item/weapon/melee/baton(src) - src.modules += new /obj/item/weapon/handcuffs(src) + src.modules += new /obj/item/weapon/handcuffs/cyborg(src) src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src) src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)