diff --git a/_maps/map_files/MetaStation/z2.dmm b/_maps/map_files/MetaStation/z2.dmm index 69f2d4a567c..ad26c7fb2ec 100644 --- a/_maps/map_files/MetaStation/z2.dmm +++ b/_maps/map_files/MetaStation/z2.dmm @@ -437,7 +437,7 @@ "iu" = (/obj/machinery/door/airlock/centcom{name = "Centcom Security"; opacity = 1; req_access_txt = "0"},/turf/unsimulated/floor{icon_state = "dark"},/area/centcom/evac) "iv" = (/turf/unsimulated/wall/fakeglass{icon_state = "fakewindows"; dir = 8},/area/centcom/evac) "iw" = (/obj/item/weapon/soap/syndie,/obj/structure/mopbucket,/obj/machinery/light{dir = 1},/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/syndicate_mothership) -"ix" = (/obj/structure/table/woodentable,/obj/item/pizzabox,/obj/item/device/paicard,/turf/unsimulated/floor{icon_state = "bar"; dir = 2},/area/syndicate_mothership) +"ix" = (/obj/structure/table/woodentable,/obj/item/pizzabox,/obj/item/device/paicard/syndicate,/turf/unsimulated/floor{icon_state = "bar"; dir = 2},/area/syndicate_mothership) "iy" = (/obj/structure/table/woodentable,/obj/item/toy/nuke,/turf/unsimulated/floor{dir = 2; icon_state = "wood"},/area/syndicate_mothership) "iz" = (/obj/effect/landmark{name = "Commando"},/turf/unsimulated/floor{icon_state = "dark"},/area/centcom/ferry) "iA" = (/obj/structure/stool/bed/chair/office/dark,/obj/effect/landmark{name = "Response Team"},/turf/unsimulated/floor{icon_state = "dark"},/area/centcom/ferry) diff --git a/_maps/map_files/cyberiad/z2.dmm b/_maps/map_files/cyberiad/z2.dmm index b832fff59f3..bbe4923497e 100644 --- a/_maps/map_files/cyberiad/z2.dmm +++ b/_maps/map_files/cyberiad/z2.dmm @@ -505,7 +505,7 @@ "jK" = (/obj/effect/decal/warning_stripes/north,/obj/machinery/light,/turf/simulated/floor/plating/airless,/area/syndicate_mothership) "jL" = (/obj/docking_port/stationary/transit{dwidth = 3; height = 7; id = "steel_rain_transit"; name = "steel_rain in transit"; width = 7},/turf/space/transit/horizontal,/area/space) "jM" = (/obj/item/weapon/soap/syndie,/obj/structure/mopbucket,/obj/machinery/light{dir = 1},/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/syndicate_mothership) -"jN" = (/obj/structure/table/woodentable,/obj/item/pizzabox,/obj/item/device/paicard,/turf/unsimulated/floor{icon_state = "bar"; dir = 2},/area/syndicate_mothership) +"jN" = (/obj/structure/table/woodentable,/obj/item/pizzabox,/obj/item/device/paicard/syndicate,/turf/unsimulated/floor{icon_state = "bar"; dir = 2},/area/syndicate_mothership) "jO" = (/obj/structure/table/woodentable,/obj/item/toy/nuke,/turf/unsimulated/floor{dir = 2; icon_state = "wood"},/area/syndicate_mothership) "jP" = (/turf/unsimulated/wall/abductor{icon_state = "alien21"},/area/abductor_ship) "jQ" = (/turf/unsimulated/wall/abductor{icon_state = "alien20"},/area/abductor_ship) diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index a2ad15e797b..11da3ad6c07 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -135,13 +135,13 @@ message = replacetextEx(message,"w","v") message = replacetextEx(message,"J","Y") message = replacetextEx(message,"j","y") - message = replacetextEx(message,"A",pick("Å","Ä","Æ","A")) - message = replacetextEx(message,"a",pick("å","ä","æ","a")) + message = replacetextEx(message,"A",pick("Ã…","Ä","Æ","A")) + message = replacetextEx(message,"a",pick("Ã¥","ä","æ","a")) message = replacetextEx(message,"BO","BJO") message = replacetextEx(message,"Bo","Bjo") message = replacetextEx(message,"bo","bjo") - message = replacetextEx(message,"O",pick("Ö","Ø","O")) - message = replacetextEx(message,"o",pick("ö","ø","o")) + message = replacetextEx(message,"O",pick("Ö","Ø","O")) + message = replacetextEx(message,"o",pick("ö","ø","o")) if(prob(30)) message += " Bork[pick("",", bork",", bork, bork")]!" return message @@ -259,7 +259,7 @@ action_icon_state = "genetic_incendiary" -/obj/effect/proc_holder/spell/targeted/immolate/cast(list/targets,mob/living/user = usr) +/obj/effect/proc_holder/spell/targeted/immolate/cast(list/targets, mob/living/user = usr) var/mob/living/carbon/L = user L.adjust_fire_stacks(0.5) L.visible_message("[L.name] suddenly bursts into flames!") diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 0e8415a15e3..e4c09aeac17 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -143,15 +143,15 @@ action_icon_state = "genetic_cryo" -/obj/effect/proc_holder/spell/targeted/cryokinesis/cast(list/targets) +/obj/effect/proc_holder/spell/targeted/cryokinesis/cast(list/targets, mob/user = usr) if(!targets.len) - to_chat(usr, "No target found in range.") + to_chat(user, "No target found in range.") return var/mob/living/carbon/C = targets[1] if(!iscarbon(C)) - to_chat(usr, "This will only work on normal organic beings.") + to_chat(user, "This will only work on normal organic beings.") return if(RESIST_COLD in C.mutations) @@ -164,15 +164,15 @@ if(istype(H.wear_suit, /obj/item/clothing/suit/space)) handle_suit = 1 if(H.internal) - H.visible_message("[usr] sprays a cloud of fine ice crystals, engulfing [H]!", - "[usr] sprays a cloud of fine ice crystals over your [H.head]'s visor.") - log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] while wearing internals and a suit") - msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") + H.visible_message("[user] sprays a cloud of fine ice crystals, engulfing [H]!", + "[user] sprays a cloud of fine ice crystals over your [H.head]'s visor.") + log_admin("[key_name(user)] has used cryokinesis on [key_name(C)] while wearing internals and a suit") + msg_admin_attack("[key_name_admin(user)] has cast cryokinesis on [key_name_admin(C)]") else - H.visible_message("[usr] sprays a cloud of fine ice crystals engulfing, [H]!", - "[usr] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.") - log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)]") - msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") + H.visible_message("[user] sprays a cloud of fine ice crystals engulfing, [H]!", + "[user] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.") + log_admin("[key_name(user)] has used cryokinesis on [key_name(C)]") + msg_admin_attack("[key_name_admin(user)] has cast cryokinesis on [key_name_admin(C)]") H.bodytemperature = max(0, H.bodytemperature - 50) H.adjustFireLoss(5) if(!handle_suit) @@ -180,11 +180,11 @@ C.adjustFireLoss(10) C.ExtinguishMob() - C.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [C]!") - log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] without internals or a suit") - msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") + C.visible_message("\red [user] sprays a cloud of fine ice crystals, engulfing [C]!") + log_admin("[key_name(user)] has used cryokinesis on [key_name(C)] without internals or a suit") + msg_admin_attack("[key_name_admin(user)] has cast cryokinesis on [key_name_admin(C)]") - //playsound(usr.loc, 'bamf.ogg', 50, 0) + //playsound(user.loc, 'bamf.ogg', 50, 0) new/obj/effect/self_deleting(C.loc, icon('icons/effects/genetics.dmi', "cryokinesis")) @@ -294,10 +294,9 @@ revert_cast(user) return - perform(targets) + perform(targets, user = user) -/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets) - var/mob/user = usr +/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets, mob/user = usr) if(!targets.len) to_chat(user, "No target found in range.") return @@ -383,60 +382,60 @@ action_icon_state = "genetic_jump" -/obj/effect/proc_holder/spell/targeted/leap/cast(list/targets) +/obj/effect/proc_holder/spell/targeted/leap/cast(list/targets, mob/user = usr) var/failure = 0 - if(istype(usr.loc,/mob/) || usr.lying || usr.stunned || usr.buckled || usr.stat) - to_chat(usr, "You can't jump right now!") + if(istype(user.loc,/mob/) || user.lying || user.stunned || user.buckled || user.stat) + to_chat(user, "You can't jump right now!") return - if(istype(usr.loc,/turf/)) - if(usr.restrained())//Why being pulled while cuffed prevents you from moving - for(var/mob/M in range(usr, 1)) - if(M.pulling == usr) - if(!M.restrained() && M.stat == 0 && M.canmove && usr.Adjacent(M)) + if(istype(user.loc,/turf/)) + if(user.restrained())//Why being pulled while cuffed prevents you from moving + for(var/mob/M in range(user, 1)) + if(M.pulling == user) + if(!M.restrained() && M.stat == 0 && M.canmove && user.Adjacent(M)) failure = 1 else M.stop_pulling() - if(usr.pinned.len) + if(user.pinned.len) failure = 1 - usr.visible_message("[usr.name] takes a huge leap!") - playsound(usr.loc, 'sound/weapons/thudswoosh.ogg', 50, 1) + user.visible_message("[user.name] takes a huge leap!") + playsound(user.loc, 'sound/weapons/thudswoosh.ogg', 50, 1) if(failure) - usr.Weaken(5) - usr.Stun(5) - usr.visible_message("[usr] attempts to leap away but is slammed back down to the ground!", + user.Weaken(5) + user.Stun(5) + user.visible_message("[user] attempts to leap away but is slammed back down to the ground!", "You attempt to leap away but are suddenly slammed back down to the ground!", "You hear the flexing of powerful muscles and suddenly a crash as a body hits the floor.") return 0 - var/prevLayer = usr.layer - var/prevFlying = usr.flying - usr.layer = 9 + var/prevLayer = user.layer + var/prevFlying = user.flying + user.layer = 9 - usr.flying = 1 + user.flying = 1 for(var/i=0, i<10, i++) - step(usr, usr.dir) - if(i < 5) usr.pixel_y += 8 - else usr.pixel_y -= 8 + step(user, user.dir) + if(i < 5) user.pixel_y += 8 + else user.pixel_y -= 8 sleep(1) - usr.flying = prevFlying + user.flying = prevFlying - if(FAT in usr.mutations && prob(66)) - usr.visible_message("[usr.name] crashes due to their heavy weight!") - //playsound(usr.loc, 'zhit.wav', 50, 1) - usr.AdjustWeakened(10) - usr.AdjustStunned(5) + if(FAT in user.mutations && prob(66)) + user.visible_message("[user.name] crashes due to their heavy weight!") + //playsound(user.loc, 'zhit.wav', 50, 1) + user.AdjustWeakened(10) + user.AdjustStunned(5) - usr.layer = prevLayer + user.layer = prevLayer - if(istype(usr.loc,/obj/)) - var/obj/container = usr.loc - to_chat(usr, "You leap and slam your head against the inside of [container]! Ouch!") - usr.AdjustParalysis(3) - usr.AdjustWeakened(5) - container.visible_message("[usr.loc] emits a loud thump and rattles a bit.") - playsound(usr.loc, 'sound/effects/bang.ogg', 50, 1) + if(istype(user.loc,/obj/)) + var/obj/container = user.loc + to_chat(user, "You leap and slam your head against the inside of [container]! Ouch!") + user.AdjustParalysis(3) + user.AdjustWeakened(5) + container.visible_message("[user.loc] emits a loud thump and rattles a bit.") + playsound(user.loc, 'sound/effects/bang.ogg', 50, 1) var/wiggle = 6 while(wiggle > 0) wiggle-- @@ -446,9 +445,6 @@ container.pixel_x = 0 container.pixel_y = 0 - - return - //////////////////////////////////////////////////////////////////////// // WAS: /datum/bioEffect/polymorphism @@ -475,6 +471,7 @@ charge_max = 1800 clothes_req = 0 + human_req = 1 stat_allowed = 0 invocation_type = "none" range = 1 @@ -482,21 +479,18 @@ action_icon_state = "genetic_poly" -/obj/effect/proc_holder/spell/targeted/polymorph/cast(list/targets) - var/mob/living/M=targets[1] +/obj/effect/proc_holder/spell/targeted/polymorph/cast(list/targets, mob/user = usr) + var/mob/living/M = targets[1] if(!ishuman(M)) to_chat(usr, "You can only change your appearance to that of another human.") return - if(!ishuman(usr)) - return - - usr.visible_message("[usr]'s body shifts and contorts.") + user.visible_message("[user]'s body shifts and contorts.") spawn(10) - if(M && usr) - playsound(usr.loc, 'sound/goonstation/effects/gib.ogg', 50, 1) - var/mob/living/carbon/human/H = usr + if(M && user) + playsound(user.loc, 'sound/goonstation/effects/gib.ogg', 50, 1) + var/mob/living/carbon/human/H = user var/mob/living/carbon/human/target = M H.UpdateAppearance(target.dna.UI) H.real_name = target.real_name @@ -524,6 +518,7 @@ desc = "Read the minds of others for information." charge_max = 180 clothes_req = 0 + human_req = 1 stat_allowed = 0 invocation_type = "none" range = -2 @@ -539,29 +534,26 @@ revert_cast(user) return - perform(targets) - -/obj/effect/proc_holder/spell/targeted/empath/cast(list/targets) - if(!ishuman(usr)) return - + perform(targets, user = user) +/obj/effect/proc_holder/spell/targeted/empath/cast(list/targets, mob/user = usr) for(var/mob/living/carbon/M in targets) if(!iscarbon(M)) - to_chat(usr, "You may only use this on other organic beings.") + to_chat(user, "You may only use this on other organic beings.") return if(PSY_RESIST in M.mutations) - to_chat(usr, "You can't see into [M.name]'s mind at all!") + to_chat(user, "You can't see into [M.name]'s mind at all!") return if(M.stat == 2) - to_chat(usr, "[M.name] is dead and cannot have their mind read.") + to_chat(user, "[M.name] is dead and cannot have their mind read.") return if(M.health < 0) - to_chat(usr, "[M.name] is dying, and their thoughts are too scrambled to read.") + to_chat(user, "[M.name] is dying, and their thoughts are too scrambled to read.") return - to_chat(usr, "Mind Reading of [M.name]:") + to_chat(user, "Mind Reading of [M.name]:") var/pain_condition = M.health // lower health means more pain var/list/randomthoughts = list("what to have for lunch","the future","the past","money", @@ -578,33 +570,33 @@ switch(pain_condition) if(81 to INFINITY) - to_chat(usr, "Condition: [M.name] feels good.") + to_chat(user, "Condition: [M.name] feels good.") if(61 to 80) - to_chat(usr, "Condition: [M.name] is suffering mild pain.") + to_chat(user, "Condition: [M.name] is suffering mild pain.") if(41 to 60) - to_chat(usr, "Condition: [M.name] is suffering significant pain.") + to_chat(user, "Condition: [M.name] is suffering significant pain.") if(21 to 40) - to_chat(usr, "Condition: [M.name] is suffering severe pain.") + to_chat(user, "Condition: [M.name] is suffering severe pain.") else - to_chat(usr, "Condition: [M.name] is suffering excruciating pain.") + to_chat(user, "Condition: [M.name] is suffering excruciating pain.") thoughts = "haunted by their own mortality" switch(M.a_intent) if(I_HELP) - to_chat(usr, "Mood: You sense benevolent thoughts from [M.name].") + to_chat(user, "Mood: You sense benevolent thoughts from [M.name].") if(I_DISARM) - to_chat(usr, "Mood: You sense cautious thoughts from [M.name].") + to_chat(user, "Mood: You sense cautious thoughts from [M.name].") if(I_GRAB) - to_chat(usr, "Mood: You sense hostile thoughts from [M.name].") + to_chat(user, "Mood: You sense hostile thoughts from [M.name].") if(I_HARM) - to_chat(usr, "Mood: You sense cruel thoughts from [M.name].") + to_chat(user, "Mood: You sense cruel thoughts from [M.name].") for(var/mob/living/L in view(7,M)) if(L == M) continue thoughts = "thinking about punching [L.name]" break else - to_chat(usr, "Mood: You sense strange thoughts from [M.name].") + to_chat(user, "Mood: You sense strange thoughts from [M.name].") if(istype(M,/mob/living/carbon/human)) var/numbers[0] @@ -613,11 +605,11 @@ numbers += H.mind.initial_account.account_number numbers += H.mind.initial_account.remote_access_pin if(numbers.len>0) - to_chat(usr, "Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") - to_chat(usr, "Thoughts: [M.name] is currently [thoughts].") + to_chat(user, "Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") + to_chat(user, "Thoughts: [M.name] is currently [thoughts].") if(EMPATH in M.mutations) - to_chat(M, "You sense [usr.name] reading your mind.") + to_chat(M, "You sense [user.name] reading your mind.") else if(prob(5) || M.mind.assigned_role=="Chaplain") to_chat(M, "You sense someone intruding upon your thoughts...") return diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 95ca2d4f4d8..3da7bb372d4 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -750,7 +750,7 @@ steam.start() -- spawns the effect var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition) I.dir = src.holder.dir flick("ion_fade", I) - I.icon_state = "blank" + I.icon_state = "" spawn( 20 ) if(I) I.delete() @@ -812,8 +812,8 @@ steam.start() -- spawns the effect II.dir = src.holder.dir flick("ion_fade", I) flick("ion_fade", II) - I.icon_state = "blank" - II.icon_state = "blank" + I.icon_state = "" + II.icon_state = "" spawn( 20 ) if(I) I.delete() if(II) II.delete() diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index d805105a906..2a2237559fb 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -77,7 +77,7 @@ drawtype = temp update_window(usr) -/obj/item/toy/crayon/afterattack(atom/target, mob/user as mob, proximity) +/obj/item/toy/crayon/afterattack(atom/target, mob/user, proximity) if(!proximity) return if(is_type_in_list(target,validSurfaces)) var/temp = "rune" @@ -95,17 +95,22 @@ if(!uses) to_chat(user, "You used up your [name]!") qdel(src) - return -/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob) +/obj/item/toy/crayon/attack(mob/M, mob/user) var/huffable = istype(src,/obj/item/toy/crayon/spraycan) if(M == user) - to_chat(user, "You take a [huffable ? "huff" : "bite"] of the [name]. Delicious!") + if(ishuman(user)) + var/mob/living/carbon/human/H = user + if(!H.check_has_mouth()) + to_chat(user, "You do not have a mouth!") + return + playsound(loc, 'sound/items/eatfood.ogg', 50, 0) + to_chat(user, "You take a [huffable ? "huff" : "bite"] of the [name]. Delicious!") user.nutrition += 5 if(uses) uses -= 5 if(uses <= 0) - to_chat(user, "There is no more of [name] left!") + to_chat(user, "There is no more of [name] left!") qdel(src) else ..() diff --git a/code/game/objects/items/devices/guitar.dm b/code/game/objects/items/devices/guitar.dm index eaf1c668e3c..bb11c5f0a2a 100644 --- a/code/game/objects/items/devices/guitar.dm +++ b/code/game/objects/items/devices/guitar.dm @@ -25,10 +25,7 @@ ui_interact(user) /obj/item/device/guitar/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(!user) - return - - if(!isliving(user) || user.stat || user.restrained() || user.lying) + if(!isliving(user) || user.incapacitated()) return song.ui_interact(user, ui_key, ui, force_open) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 68b0b8d2dca..ab61008816c 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -11,11 +11,16 @@ var/obj/item/device/radio/radio var/looking_for_personality = 0 var/mob/living/silicon/pai/pai + var/list/faction = list("neutral") // The factions the pAI will inherit from the card + +/obj/item/device/paicard/syndicate + name = "syndicate personal AI device" + faction = list("syndicate") /obj/item/device/paicard/relaymove(var/mob/user, var/direction) if(user.stat || user.stunned) return - var/obj/item/weapon/rig/rig = src.get_rig() + var/obj/item/weapon/rig/rig = get_rig() if(istype(rig)) rig.forced_move(direction, user) @@ -260,7 +265,7 @@ to_chat(usr, "\red The request system is currently offline. Please wait another [cooldown_time] seconds.") return last_request = world.time / 10 - src.looking_for_personality = 1 + looking_for_personality = 1 paiController.findPAI(src, usr) if(href_list["wipe"]) var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No") @@ -297,33 +302,33 @@ // WIRE_TRANSMIT = 4 /obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality) - src.pai = personality - src.overlays += "pai-happy" + pai = personality + overlays += "pai-happy" /obj/item/device/paicard/proc/removePersonality() - src.pai = null - src.overlays.Cut() - src.overlays += "pai-off" + pai = null + overlays.Cut() + overlays += "pai-off" /obj/item/device/paicard var/current_emotion = 1 /obj/item/device/paicard/proc/setEmotion(var/emotion) if(pai) - src.overlays.Cut() + overlays.Cut() switch(emotion) - if(1) src.overlays += "pai-happy" - if(2) src.overlays += "pai-cat" - if(3) src.overlays += "pai-extremely-happy" - if(4) src.overlays += "pai-face" - if(5) src.overlays += "pai-laugh" - if(6) src.overlays += "pai-off" - if(7) src.overlays += "pai-sad" - if(8) src.overlays += "pai-angry" - if(9) src.overlays += "pai-what" + if(1) overlays += "pai-happy" + if(2) overlays += "pai-cat" + if(3) overlays += "pai-extremely-happy" + if(4) overlays += "pai-face" + if(5) overlays += "pai-laugh" + if(6) overlays += "pai-off" + if(7) overlays += "pai-sad" + if(8) overlays += "pai-angry" + if(9) overlays += "pai-what" current_emotion = emotion /obj/item/device/paicard/proc/alertUpdate() - var/turf/T = get_turf_or_move(src.loc) + var/turf/T = get_turf_or_move(loc) for(var/mob/M in viewers(T)) M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2) diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm index 323fb3db4f4..3ad1e98d6a6 100644 --- a/code/game/objects/items/devices/violin.dm +++ b/code/game/objects/items/devices/violin.dm @@ -30,10 +30,7 @@ ui_interact(user) /obj/item/device/violin/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(!user) - return - - if(!isliving(user) || user.stat || user.restrained() || user.lying) + if(!isliving(user) || user.incapacitated()) return song.ui_interact(user, ui_key, ui, force_open) diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index f1d9b6ac578..9b4059f1d1d 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -138,10 +138,10 @@ return data /datum/song/Topic(href, href_list) - if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || !usr.canmove || usr.restrained()) + if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || usr.incapacitated()) usr << browse(null, "window=instrument") usr.unset_machine() - return + return 1 instrumentObj.add_fingerprint(usr) @@ -168,6 +168,8 @@ //split into lines spawn() lines = splittext(t, "\n") + if(lines.len == 0) + return 1 if(copytext(lines[1],1,6) == "BPM: ") tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6))) lines.Cut(1,2) @@ -291,7 +293,7 @@ ui_interact(user) /obj/structure/piano/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(!user || !anchored) + if(!isliving(user) || user.incapacitated() || !anchored) return song.ui_interact(user, ui_key, ui, force_open) diff --git a/code/modules/detective_work/evidence.dm b/code/modules/detective_work/evidence.dm index 6f62a7eecac..e457d73fb87 100644 --- a/code/modules/detective_work/evidence.dm +++ b/code/modules/detective_work/evidence.dm @@ -40,8 +40,7 @@ if(!isturf(I.loc)) //If it isn't on the floor. Do some checks to see if it's in our hands or a box. Otherwise give up. if(istype(I.loc,/obj/item/weapon/storage)) //in a container. var/obj/item/weapon/storage/U = I.loc - user.client.screen -= I - U.contents.Remove(I) + U.remove_from_storage(I, src) else if(user.l_hand == I) //in a hand user.drop_l_hand() else if(user.r_hand == I) //in a hand @@ -59,6 +58,7 @@ I.pixel_x = 0 //then remove it so it'll stay within the evidence bag I.pixel_y = 0 var/image/img = image("icon"=I, "layer"=FLOAT_LAYER) //take a snapshot. (necessary to stop the underlays appearing under our inventory-HUD slots ~Carn + img.plane = FLOAT_PLANE I.pixel_x = xx //and then return it I.pixel_y = yy overlays += img @@ -69,7 +69,7 @@ w_class = I.w_class return 1 -/obj/item/weapon/evidencebag/attack_self(mob/user as mob) +/obj/item/weapon/evidencebag/attack_self(mob/user) if(contents.len) var/obj/item/I = contents[1] user.visible_message("[user] takes [I] out of [src].", "You take [I] out of [src].",\ @@ -83,17 +83,16 @@ else to_chat(user, "[src] is empty.") icon_state = "evidenceobj" - return /obj/item/weapon/storage/box/evidence name = "evidence bag box" desc = "A box claiming to contain evidence bags." - New() - new /obj/item/weapon/evidencebag(src) - new /obj/item/weapon/evidencebag(src) - new /obj/item/weapon/evidencebag(src) - new /obj/item/weapon/evidencebag(src) - new /obj/item/weapon/evidencebag(src) - new /obj/item/weapon/evidencebag(src) - ..() - return \ No newline at end of file + +/obj/item/weapon/storage/box/evidence/New() + new /obj/item/weapon/evidencebag(src) + new /obj/item/weapon/evidencebag(src) + new /obj/item/weapon/evidencebag(src) + new /obj/item/weapon/evidencebag(src) + new /obj/item/weapon/evidencebag(src) + new /obj/item/weapon/evidencebag(src) + ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 3b5b415964d..4e2c7acb2b2 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -1,6 +1,6 @@ /obj/item/device/mmi/posibrain name = "positronic brain" - desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. The speaker switch is set to 'on'." + desc = "A cube of shining metal, four inches to a side and covered in shallow grooves." icon = 'icons/obj/assemblies.dmi' icon_state = "posibrain" w_class = 3 @@ -15,11 +15,14 @@ var/silenced = 0 //if set to 1, they can't talk. var/next_ping_at = 0 +/obj/item/device/mmi/posibrain/examine(mob/user) + if(..(user, 1)) + to_chat(user, "Its speaker is turned [silenced ? "off" : "on"].") -/obj/item/device/mmi/posibrain/attack_self(mob/user as mob) +/obj/item/device/mmi/posibrain/attack_self(mob/user) if(brainmob && !brainmob.key && searching == 0) //Start the process of searching for a new user. - to_chat(user, "\blue You carefully locate the manual activation switch and start the positronic brain's boot process.") + to_chat(user, "You carefully locate the manual activation switch and start the positronic brain's boot process.") icon_state = "posibrain-searching" ghost_volunteers.Cut() src.searching = 1 @@ -31,18 +34,10 @@ transfer_personality(O) reset_search() else - if(silenced) - silenced = 0 - to_chat(user, "You toggle the speaker to 'on', on the [src].") - desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. The speaker switch is set to 'on'." - if(brainmob && brainmob.key) - to_chat(brainmob, "Your internal speaker has been toggled to 'on'.") - else - silenced = 1 - to_chat(user, "You toggle the speaker to 'off', on the [src].") - desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. The speaker switch is set to 'off'." - if(brainmob && brainmob.key) - to_chat(brainmob, "Your internal speaker has been toggled to 'off'.") + silenced = !silenced + to_chat(user, "You toggle the speaker [silenced ? "off" : "on"].") + if(brainmob && brainmob.key) + to_chat(brainmob, "Your internal speaker has been toggled [silenced ? "off" : "on"].") /obj/item/device/mmi/posibrain/proc/request_player() for(var/mob/dead/observer/O in player_list) diff --git a/code/modules/mob/living/carbon/brain/say.dm b/code/modules/mob/living/carbon/brain/say.dm index a343d245424..2a789acae0e 100644 --- a/code/modules/mob/living/carbon/brain/say.dm +++ b/code/modules/mob/living/carbon/brain/say.dm @@ -1,23 +1,33 @@ //TODO: Convert this over for languages. /mob/living/carbon/brain/say(var/message, var/datum/language/speaking = null) - if(silent) + if(!can_speak(warning = TRUE)) + return + + if(prob(emp_damage * 4)) + if(prob(10)) //10% chance to drop the message entirely + return + else + message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher + + ..(message) + +/mob/living/carbon/brain/whisper(message as text) + if(!can_speak(warning = TRUE)) return - if(!(container && istype(container, /obj/item/device/mmi))) - return //No MMI, can't speak, bucko./N - else - if(container && istype(container, /obj/item/device/mmi/posibrain)) - var/obj/item/device/mmi/posibrain/P = container - if(P && P.silenced) - to_chat(usr, "You cannot speak, as your internal speaker has been toggled to 'off'.") - return - if(prob(emp_damage*4)) - if(prob(10))//10% chane to drop the message entirely - return - else - message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher + ..() + +/mob/living/carbon/brain/can_speak(var/warning = FALSE) + . = ..() - ..(message) + if(!istype(container, /obj/item/device/mmi)) + . = FALSE + else if(istype(container, /obj/item/device/mmi/posibrain)) + var/obj/item/device/mmi/posibrain/P = container + if(P && P.silenced) + if(warning) + to_chat(usr, "You cannot speak, as your internal speaker is turned off.") + . = FALSE /mob/living/carbon/brain/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name) switch(message_mode) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c2e2f090bb2..f9e2b42d68b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1246,7 +1246,6 @@ return 0 return 1 - /mob/living/carbon/human/proc/get_visible_gender() if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask)) return NEUTER diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index a81dae5234a..125eb110c66 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -83,12 +83,14 @@ var/current_pda_messaging = null /mob/living/silicon/pai/New(var/obj/item/device/paicard) - src.loc = paicard + loc = paicard card = paicard + if(card) + faction = card.faction.Copy() sradio = new(src) if(card) if(!card.radio) - card.radio = new /obj/item/device/radio(src.card) + card.radio = new /obj/item/device/radio(card) radio = card.radio //Default languages without universal translator software @@ -122,7 +124,7 @@ // this function shows the information about being silenced as a pAI in the Status panel /mob/living/silicon/pai/proc/show_silenced() - if(src.silence_time) + if(silence_time) var/timeleft = round((silence_time - world.timeofday)/10 ,1) stat(null, "Communications system reboot in -[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") @@ -130,7 +132,7 @@ /mob/living/silicon/pai/Stat() ..() statpanel("Status") - if(src.client.statpanel == "Status") + if(client.statpanel == "Status") show_silenced() if(proc_holder_list.len)//Generic list for proc_holder objects. @@ -138,20 +140,20 @@ statpanel("[P.panel]","",P) /mob/living/silicon/pai/check_eye(var/mob/user as mob) - if(!src.current) + if(!current) return null - user.reset_perspective(src.current) + user.reset_perspective(current) return 1 /mob/living/silicon/pai/blob_act() - if(src.stat != 2) - src.adjustBruteLoss(60) - src.updatehealth() + if(stat != 2) + adjustBruteLoss(60) + updatehealth() return 1 return 0 /mob/living/silicon/pai/restrained() - if(istype(src.loc,/obj/item/device/paicard)) + if(istype(loc,/obj/item/device/paicard)) return 0 ..() @@ -165,18 +167,18 @@ // 33% chance to change prime directive (based on severity) // 33% chance of no additional effect - src.silence_time = world.timeofday + 120 * 10 // Silence for 2 minutes + silence_time = world.timeofday + 120 * 10 // Silence for 2 minutes to_chat(src, "Communication circuit overload. Shutting down and reloading communication circuits - speech and messaging functionality will be unavailable until the reboot is complete.") if(prob(20)) - var/turf/T = get_turf_or_move(src.loc) + var/turf/T = get_turf_or_move(loc) for(var/mob/M in viewers(T)) M.show_message("\red A shower of sparks spray from [src]'s inner workings.", 3, "\red You hear and smell the ozone hiss of electrical sparks being expelled violently.", 2) - return src.death(0) + return death(0) switch(pick(1,2,3)) if(1) - src.master = null - src.master_dna = null + master = null + master_dna = null to_chat(src, "You feel unbound.") if(2) var/command @@ -184,7 +186,7 @@ command = pick("Serve", "Love", "Fool", "Entice", "Observe", "Judge", "Respect", "Educate", "Amuse", "Entertain", "Glorify", "Memorialize", "Analyze") else command = pick("Serve", "Kill", "Love", "Hate", "Disobey", "Devour", "Fool", "Enrage", "Entice", "Observe", "Judge", "Respect", "Disrespect", "Consume", "Educate", "Destroy", "Disgrace", "Amuse", "Entertain", "Ignite", "Glorify", "Memorialize", "Analyze") - src.pai_law0 = "[command] your master." + pai_law0 = "[command] your master." to_chat(src, "Pr1m3 d1r3c71v3 uPd473D.") if(3) to_chat(src, "You feel an electric surge run through your circuitry and become acutely aware at how lucky you are that you can still feel at all.") @@ -194,15 +196,15 @@ switch(severity) if(1.0) - if(src.stat != 2) + if(stat != 2) adjustBruteLoss(100) adjustFireLoss(100) if(2.0) - if(src.stat != 2) + if(stat != 2) adjustBruteLoss(60) adjustFireLoss(60) if(3.0) - if(src.stat != 2) + if(stat != 2) adjustBruteLoss(30) return @@ -219,8 +221,8 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("[M] [M.attacktext] [src]!", 1) - M.create_attack_log("attacked [src.name] ([src.ckey])") - src.create_attack_log("was attacked by [M.name] ([M.ckey])") + M.create_attack_log("attacked [name] ([ckey])") + create_attack_log("was attacked by [M.name] ([M.ckey])") var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) updatehealth() @@ -230,7 +232,7 @@ to_chat(M, "You cannot attack people before the game has started.") return - if(istype(src.loc, /turf) && istype(src.loc.loc, /area/start)) + if(istype(loc, /turf) && istype(loc.loc, /area/start)) to_chat(M, "You cannot attack someone in the spawn area.") return @@ -245,16 +247,16 @@ M.do_attack_animation(src) var/damage = rand(10, 20) if(prob(90)) - playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1) + playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) for(var/mob/O in viewers(src, null)) if((O.client && !( O.blinded ))) O.show_message(text("[] has slashed at []!", M, src), 1) if(prob(8)) flash_eyes(affect_silicon = 1) - src.adjustBruteLoss(damage) - src.updatehealth() + adjustBruteLoss(damage) + updatehealth() else - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) + playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) for(var/mob/O in viewers(src, null)) if((O.client && !( O.blinded ))) O.show_message(text("[] took a swipe at []!", M, src), 1) @@ -263,16 +265,16 @@ /mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C) usr:cameraFollow = null if(!C) - src.unset_machine() - src.reset_perspective(null) + unset_machine() + reset_perspective(null) return 0 - if(stat == 2 || !C.status || !(src.network in C.network)) return 0 + if(stat == 2 || !C.status || !(network in C.network)) return 0 // ok, we're alive, camera is good and in our network... - src.set_machine(src) + set_machine(src) src:current = C - src.reset_perspective(C) + reset_perspective(C) return 1 /mob/living/silicon/pai/verb/reset_record_view() @@ -291,8 +293,8 @@ /mob/living/silicon/pai/cancel_camera() set category = "pAI Commands" set name = "Cancel Camera View" - src.reset_perspective(null) - src.unset_machine() + reset_perspective(null) + unset_machine() src:cameraFollow = null //Addition by Mord_Sith to define AI's network change ability @@ -300,8 +302,8 @@ /mob/living/silicon/pai/proc/pai_network_change() set category = "pAI Commands" set name = "Change Camera Network" - src.reset_perspective(null) - src.unset_machine() + reset_perspective(null) + unset_machine() src:cameraFollow = null var/cameralist[0] @@ -316,8 +318,8 @@ if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison") COMPILE ERROR! This will have to be updated as camera.network is no longer a string, but a list instead cameralist[C.network] = C.network - src.network = input(usr, "Which network would you like to view?") as null|anything in cameralist - to_chat(src, "\blue Switched to [src.network] camera network.") + network = input(usr, "Which network would you like to view?") as null|anything in cameralist + to_chat(src, "\blue Switched to [network] camera network.") //End of code by Mord_Sith */ @@ -327,7 +329,7 @@ /mob/verb/makePAI(var/turf/t in view()) var/obj/item/device/paicard/card = new(t) var/mob/living/silicon/pai/pai = new(card) - pai.key = src.key + pai.key = key card.setPersonality(pai) */ @@ -394,7 +396,7 @@ var/choice var/finalized = "No" - while(finalized == "No" && src.client) + while(finalized == "No" && client) choice = input(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.") as null|anything in possible_chassis if(!choice) return @@ -425,9 +427,9 @@ set category = "IC" // Pass lying down or getting up to our pet human, if we're in a rig. - if(stat == CONSCIOUS && istype(src.loc,/obj/item/device/paicard)) + if(stat == CONSCIOUS && istype(loc,/obj/item/device/paicard)) resting = 0 - var/obj/item/weapon/rig/rig = src.get_rig() + var/obj/item/weapon/rig/rig = get_rig() if(istype(rig)) rig.force_rest(src) else @@ -449,15 +451,15 @@ updatehealth() N.use(1) user.visible_message("[user.name] applied some [W] at [src]'s damaged areas.",\ - "You apply some [W] at [src.name]'s damaged areas.") + "You apply some [W] at [name]'s damaged areas.") else - to_chat(user, "All [src.name]'s systems are nominal.") + to_chat(user, "All [name]'s systems are nominal.") return else if(W.force) visible_message("[user.name] attacks [src] with [W]!") - src.adjustBruteLoss(W.force) - src.updatehealth() + adjustBruteLoss(W.force) + updatehealth() else visible_message("[user.name] bonks [src] harmlessly with [W].") spawn(1) @@ -529,9 +531,9 @@ var/msg = "" - switch(src.stat) + switch(stat) if(CONSCIOUS) - if(!src.client) msg += "\nIt appears to be in stand-by mode." //afk + if(!client) msg += "\nIt appears to be in stand-by mode." //afk if(UNCONSCIOUS) msg += "\nIt doesn't seem to be responding." if(DEAD) msg += "\nIt looks completely unsalvageable." diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 80f45fa0eaf..a1df4a961ac 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -130,12 +130,12 @@ var/list/alldepartments = list() if(href_list["dept"]) if(authenticated) var/lastdestination = destination - var/list/combineddepartments = alldepartments + var/list/combineddepartments = alldepartments.Copy() if(long_range_enabled) - combineddepartments += admin_departments + combineddepartments += admin_departments.Copy() if(emagged) - combineddepartments += hidden_admin_departments + combineddepartments += hidden_admin_departments.Copy() destination = input(usr, "To which department?", "Choose a department", "") as null|anything in combineddepartments if(!destination) diff --git a/nano/templates/faxmachine.tmpl b/nano/templates/faxmachine.tmpl index 76e68027a5c..e52c40eb927 100644 --- a/nano/templates/faxmachine.tmpl +++ b/nano/templates/faxmachine.tmpl @@ -59,9 +59,9 @@ Used In File(s): \code\modules\paperwork\faxmachine.dm
{{if data.authenticated}} - {{:helper.link(data.cooldown && data.respectcooldown ? "Realigning" : "Send", data.cooldown && data.respectcooldown ? 'clock-o' : "mail-closed", {'send' : 1}, data.cooldown && data.respectcooldown ? 'disabled' : "")}} + {{:helper.link(data.cooldown && data.respectcooldown ? "Realigning" : "Send", data.cooldown && data.respectcooldown ? 'clock-o' : "envelope-o", {'send' : 1}, data.cooldown && data.respectcooldown ? 'disabled' : "")}} {{else}} - {{:helper.link(data.cooldown && data.respectcooldown ? "Realigning" : "Send", data.cooldown && data.respectcooldown ? 'clock-o' : "mail-closed", null, !data.authenticated ? 'disabled' : "")}} + {{:helper.link(data.cooldown && data.respectcooldown ? "Realigning" : "Send", data.cooldown && data.respectcooldown ? 'clock-o' : "envelope-o", null, !data.authenticated ? 'disabled' : "")}} {{/if}}
\ No newline at end of file