diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 33a952ace87..b0dcf14933f 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -79,7 +79,7 @@ component_parts += new /obj/item/stack/cable_coil(null, 1) component_parts += new /obj/item/stack/cable_coil(null, 1) RefreshParts() - + /obj/machinery/dna_scannernew/RefreshParts() scan_level = 0 damage_coeff = 0 @@ -190,7 +190,7 @@ return if(L == user) return - visible_message("[user] puts [L.name] into the DNA Scanner.", 3) + visible_message("[user] puts [L.name] into the DNA Scanner.") put_in(L) if(user.pulling == L) user.pulling = null @@ -316,21 +316,21 @@ for(var/atom/movable/A as mob|obj in src) A.forceMove(src.loc) qdel(src) - + // Checks if occupants can be irradiated/mutated - prevents exploits where wearing full rad protection would still let you gain mutations /obj/machinery/dna_scannernew/proc/radiation_check() if(!occupant) return 1 - + if(ishuman(occupant)) var/mob/living/carbon/human/H = occupant if((H.species.flags & NO_DNA_RAD)) return 1 - + var/radiation_protection = occupant.run_armor_check(null, "rad", "Your clothes feel warm.", "Your clothes feel warm.") if (radiation_protection > NEGATE_MUTATION_THRESHOLD) return 1 - + return 0 /obj/machinery/computer/scan_consolenew @@ -445,9 +445,9 @@ if(..(user)) return - if(stat & (NOPOWER|BROKEN)) - return - + if(stat & (NOPOWER|BROKEN)) + return + ui_interact(user) /** @@ -588,10 +588,10 @@ return 1 // return 1 forces an update to all Nano uis attached to src var/radiation = (((src.radiation_intensity*3)+src.radiation_duration*3) / connected.damage_coeff) - src.connected.occupant.apply_effect(radiation,IRRADIATE,0) - if(src.connected.radiation_check()) + src.connected.occupant.apply_effect(radiation,IRRADIATE,0) + if(src.connected.radiation_check()) return 1 - + if (prob(95)) if(prob(75)) randmutb(src.connected.occupant) @@ -691,29 +691,29 @@ if (!src.connected.occupant) return 1 - + if (prob((80 + (src.radiation_duration / 2)))) var/radiation = (src.radiation_intensity+src.radiation_duration) src.connected.occupant.apply_effect(radiation,IRRADIATE,0) - + if(src.connected.radiation_check()) return 1 - + block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration) src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block) src.connected.occupant.UpdateAppearance() else var/radiation = ((src.radiation_intensity*2)+src.radiation_duration) - src.connected.occupant.apply_effect(radiation,IRRADIATE,0) + src.connected.occupant.apply_effect(radiation,IRRADIATE,0) if(src.connected.radiation_check()) return 1 - + if (prob(20+src.radiation_intensity)) randmutb(src.connected.occupant) domutcheck(src.connected.occupant,src.connected) else randmuti(src.connected.occupant) - src.connected.occupant.UpdateAppearance() + src.connected.occupant.UpdateAppearance() return 1 // return 1 forces an update to all Nano uis attached to src //////////////////////////////////////////////////////// @@ -755,16 +755,16 @@ sleep(10*src.radiation_duration) // sleep for radiation_duration seconds irradiating = 0 - src.connected.locked = lock_state - - if(src.connected.occupant) + src.connected.locked = lock_state + + if(src.connected.occupant) if (prob((80 + ((src.radiation_duration / 2) + (connected.precision_coeff ** 3))))) var/radiation = ((src.radiation_intensity+src.radiation_duration) / connected.damage_coeff) - src.connected.occupant.apply_effect(radiation,IRRADIATE,0) - + src.connected.occupant.apply_effect(radiation,IRRADIATE,0) + if(src.connected.radiation_check()) return 1 - + var/real_SE_block=selected_se_block block = miniscramble(block, src.radiation_intensity, src.radiation_duration) if(prob(20)) @@ -782,7 +782,7 @@ if(src.connected.radiation_check()) return 1 - + if (prob(80-src.radiation_duration)) //testing("Random bad mut!") randmutb(src.connected.occupant) @@ -893,8 +893,8 @@ src.connected.locked = lock_state var/radiation = (rand(20,50) / connected.damage_coeff) - src.connected.occupant.apply_effect(radiation,IRRADIATE,0) - + src.connected.occupant.apply_effect(radiation,IRRADIATE,0) + if(src.connected.radiation_check()) return 1 diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index d7cf74d8137..6a0bd412e8f 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -92,7 +92,7 @@ if (C == user) user.visible_message("[user] climbs on the operating table.","You climb on the operating table.") else - visible_message("[C] has been laid on the operating table by [user].", 3) + visible_message("[C] has been laid on the operating table by [user].") if (C.client) C.client.perspective = EYE_PERSPECTIVE C.client.eye = src diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 6cb48aef355..2459e1cc121 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -308,7 +308,7 @@ user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") src.updateUsrDialog() return - + else user << "\red The sleeper has a beaker already." return @@ -354,7 +354,7 @@ usr << "[G:affecting.name] will not fit into the sleeper because they have a slime latched onto their head." return - visible_message("[user] starts putting [G:affecting:name] into the sleeper.", 3) + visible_message("[user] starts putting [G:affecting:name] into the sleeper.") if(do_after(user, 20, target = G:affecting)) if(src.occupant) @@ -555,9 +555,9 @@ usr << "[L.name] will not fit into the sleeper because they have a slime latched onto their head." return if(L == user) - visible_message("[user] starts climbing into the sleeper.", 3) + visible_message("[user] starts climbing into the sleeper.") else - visible_message("[user] starts putting [L.name] into the sleeper.", 3) + visible_message("[user] starts putting [L.name] into the sleeper.") if(do_after(user, 20, target = L)) if(src.occupant) @@ -599,7 +599,7 @@ if(M.Victim == usr) usr << "You're too busy getting your life sucked out of you." return - visible_message("[usr] starts climbing into the sleeper.", 3) + visible_message("[usr] starts climbing into the sleeper.") if(do_after(usr, 20, target = usr)) if(src.occupant) usr << "\blue The sleeper is already occupied!" diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 4ffe2a33052..1d6e07b04c6 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -28,7 +28,7 @@ component_parts += new /obj/item/weapon/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 2) RefreshParts() - + /obj/machinery/bodyscanner/upgraded/New() ..() component_parts = list() @@ -129,9 +129,9 @@ usr << "[L.name] will not fit into the body scanner because they have a slime latched onto their head." return if(L == user) - visible_message("[user] climbs into the body scanner.", 3) + visible_message("[user] climbs into the body scanner.") else - visible_message("[user] puts [L.name] into the body scanner.", 3) + visible_message("[user] puts [L.name] into the body scanner.") if (L.client) L.client.perspective = EYE_PERSPECTIVE @@ -350,21 +350,21 @@ /obj/machinery/body_scanconsole/attack_ai(user as mob) return attack_hand(user) - + /obj/machinery/body_scanconsole/attack_ghost(user as mob) return attack_hand(user) /obj/machinery/body_scanconsole/attack_hand(user as mob) if(stat & (NOPOWER|BROKEN)) return - + if (panel_open) user << "Close the maintenance panel first." return - + if(!src.connected) findscanner() - + if (src.connected) if(!connected.occupant) user << "The scanner is empty." diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index b4e9dc9822c..2db4a6a64e8 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -19,7 +19,7 @@ /obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob) if(..()) return 1 - + user.set_machine(src) var/dat @@ -195,7 +195,7 @@ if(!..()) return - + if(active) if(!checkInteg(linkedholodeck)) damaged = 1 @@ -348,10 +348,10 @@ /obj/structure/table/holotable name = "table" -/obj/structure/table/holotable/attack_alien(mob/user as mob) +/obj/structure/table/holotable/attack_alien(mob/user as mob) return attack_hand(user) -/obj/structure/table/holotable/attack_animal(mob/living/simple_animal/user as mob) +/obj/structure/table/holotable/attack_animal(mob/living/simple_animal/user as mob) return attack_hand(user) /obj/structure/table/holotable/attack_hand(mob/user as mob) @@ -387,11 +387,11 @@ pressure_resistance = 4*ONE_ATMOSPHERE anchored = 1.0 flags = ON_BORDER - + /obj/structure/rack/holorack name = "rack" -/obj/structure/rack/holorack/attack_alien(mob/user as mob) +/obj/structure/rack/holorack/attack_alien(mob/user as mob) return attack_hand(user) /obj/structure/rack/holorack/attack_animal(mob/living/simple_animal/user as mob) @@ -480,12 +480,12 @@ return G.affecting.loc = src.loc G.affecting.Weaken(5) - visible_message("[G.assailant] dunks [G.affecting] into the [src]!", 3) + visible_message("[G.assailant] dunks [G.affecting] into the [src]!") qdel(W) return else if (istype(W, /obj/item) && get_dist(src,user)<2) user.drop_item(src) - visible_message("[user] dunks [W] into the [src]!", 3) + visible_message("[user] dunks [W] into the [src]!") return /obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) @@ -495,9 +495,9 @@ return if(prob(50)) I.loc = src.loc - visible_message("Swish! \the [I] lands in \the [src].", 3) + visible_message("Swish! \the [I] lands in \the [src].") else - visible_message("\The [I] bounces off of \the [src]'s rim!", 3) + visible_message("\The [I] bounces off of \the [src]'s rim!") return 0 else return ..(mover, target, height, air_group) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 1a3361425d9..ceb15bc79b7 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -49,7 +49,7 @@ component_parts += new /obj/item/weapon/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) RefreshParts() - + /obj/machinery/atmospherics/unary/cryo_cell/construction() ..(dir,dir) @@ -113,9 +113,9 @@ return if(put_mob(L)) if(L == user) - visible_message("[user] climbs into the cryo cell.", 3) + visible_message("[user] climbs into the cryo cell.") else - visible_message("[user] puts [L.name] into the cryo cell.", 3) + visible_message("[user] puts [L.name] into the cryo cell.") if(user.pulling == L) user.pulling = null @@ -157,11 +157,11 @@ /obj/machinery/atmospherics/unary/cryo_cell/attack_ghost(mob/user) return attack_hand(user) - + /obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user) if(user == occupant) return - + if(panel_open) usr << "\blue Close the maintenance panel first." return diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 24c7acc269e..f509cb9026d 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -110,7 +110,7 @@ user << "\The [I] is no longer in storage." return - visible_message("The console beeps happily as it disgorges \the [I].", 3) + visible_message("The console beeps happily as it disgorges \the [I].") I.loc = get_turf(src) frozen_items -= I @@ -125,7 +125,7 @@ user << "There is nothing to recover from storage." return - visible_message("The console beeps happily as it disgorges the desired objects.", 3) + visible_message("The console beeps happily as it disgorges the desired objects.") for(var/obj/item/I in frozen_items) I.loc = get_turf(src) @@ -420,7 +420,7 @@ else announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]") - visible_message("\The [src] hums and hisses as it moves [occupant.real_name] into storage.", 3) + visible_message("\The [src] hums and hisses as it moves [occupant.real_name] into storage.") // Delete the mob. qdel(occupant) @@ -458,7 +458,7 @@ if(willing) - visible_message("[user] starts putting [G:affecting:name] into \the [src].", 3) + visible_message("[user] starts putting [G:affecting:name] into \the [src].") if(do_after(user, 20, target = G:affecting)) if(!M || !G || !G:affecting) return @@ -547,9 +547,9 @@ if(willing) if(L == user) - visible_message("[user] starts climbing into the cryo pod.", 3) + visible_message("[user] starts climbing into the cryo pod.") else - visible_message("[user] starts putting [L] into the cryo pod.", 3) + visible_message("[user] starts putting [L] into the cryo pod.") if(do_after(user, 20, target = L)) if(!L) return @@ -637,7 +637,7 @@ usr << "You're too busy getting your life sucked out of you." return - visible_message("[usr] starts climbing into \the [src].", 3) + visible_message("[usr] starts climbing into \the [src].") if(do_after(usr, 20, target = usr)) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index e697eed0fea..8cdd74790ac 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -389,7 +389,7 @@ src.SUIT = null if(src.MASK) src.MASK = null - visible_message("With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.", 3) + visible_message("With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.") src.isbroken = 1 src.isopen = 1 src.islocked = 0 @@ -484,7 +484,7 @@ if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) usr << "It's too cluttered inside for you to fit in!" return - visible_message("[usr] starts squeezing into the suit storage unit!", 3) + visible_message("[usr] starts squeezing into the suit storage unit!") if(do_after(usr, 10, target = usr)) usr.stop_pulling() usr.client.perspective = EYE_PERSPECTIVE @@ -528,7 +528,7 @@ if ( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) //Unit needs to be absolutely empty user << "The unit's storage area is too cluttered." return - visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3) + visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.") if(do_after(user, 20, target = G:affecting)) if(!G || !G.affecting) return //derpcheck var/mob/M = G.affecting @@ -685,7 +685,7 @@ user << "\red There is no room inside the cycler for [G.affecting.name]." return - visible_message("[user] starts putting [G.affecting.name] into the suit cycler.", 3) + visible_message("[user] starts putting [G.affecting.name] into the suit cycler.") if(do_after(user, 20, target = G:affecting)) if(!G || !G.affecting) return diff --git a/code/modules/admin/verbs/onlyoneteam.dm b/code/modules/admin/verbs/onlyoneteam.dm index 23f4df6116b..016b4c891a0 100644 --- a/code/modules/admin/verbs/onlyoneteam.dm +++ b/code/modules/admin/verbs/onlyoneteam.dm @@ -2,12 +2,12 @@ if(!ticker) alert("The game hasn't started yet!") return - + var/list/incompatible_species = list("Plasmaman") for(var/mob/living/carbon/human/H in player_list) - if(H.stat == DEAD || !(H.client)) + if(H.stat == DEAD || !(H.client)) continue - if(is_special_character(H)) + if(is_special_character(H)) continue if(H.species.name in incompatible_species) H.set_species("Human") @@ -55,7 +55,7 @@ H.species.equip(H) H.regenerate_icons() - + message_admins("[key_name_admin(usr)] used DODGEBAWWWWWWWL! -NO ATTACK LOGS WILL BE SENT TO ADMINS FROM THIS POINT FORTH-", 1) log_admin("[key_name(usr)] used dodgeball.") nologevent = 1 @@ -85,6 +85,6 @@ return else playsound(src, 'sound/items/dodgeball.ogg', 50, 1) - visible_message("[H] HAS BEEN ELIMINATED!", 3) + visible_message("[H] HAS BEEN ELIMINATED!") H.melt() return diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 3981a18f59d..10b8d580447 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -18,6 +18,12 @@ /obj/item/organ/brain/attack_self(mob/user as mob) return //let's not have players taken out of the round as easily as a click, once you have their brain. +/obj/item/organ/brain/surgeryize() + if(!owner) + return + owner.ear_damage = 0 //Yeah, didn't you...hear? The ears are totally inside the brain. + owner.ear_deaf = 0 + /obj/item/organ/brain/xeno name = "thinkpan" desc = "It looks kind of like an enormous wad of purple bubblegum." diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index a93d2a278a8..e7d4fd89eba 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -323,4 +323,7 @@ var/list/organ_cache = list() if(fingerprintslast) O.fingerprintslast = fingerprintslast user.put_in_active_hand(O) - qdel(src) \ No newline at end of file + qdel(src) + +/obj/item/organ/proc/surgeryize() + return \ No newline at end of file diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 323fe8519c1..46d7f01b0d9 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -81,6 +81,14 @@ owner.b_eyes ? owner.b_eyes : 0 ) +/obj/item/organ/eyes/surgeryize() + if(!owner) + return + owner.disabilities &= ~NEARSIGHTED + owner.sdisabilities &= ~BLIND + owner.eye_blurry = 0 + owner.eye_blind = 0 + /obj/item/organ/liver name = "liver" icon_state = "liver" diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/newchem/medicine.dm index e20a8d1c491..9905345926b 100644 --- a/code/modules/reagents/newchem/medicine.dm +++ b/code/modules/reagents/newchem/medicine.dm @@ -513,16 +513,25 @@ datum/reagent/morphine/addiction_act_stage4(var/mob/living/M as mob) datum/reagent/oculine/on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M.eye_blurry = max(M.eye_blurry-5 , 0) - M.eye_blind = max(M.eye_blind-5 , 0) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] - if(istype(E)) - if(E.damage > 0) - E.damage -= 1 + if(prob(80)) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] + if(istype(E)) + E.damage = max(E.damage-1, 0) + M.eye_blurry = max(M.eye_blurry-1 , 0) + M.ear_damage = max(M.ear_damage-1, 0) + if(prob(50)) + M.disabilities &= ~NEARSIGHTED + if(prob(30)) + M.sdisabilities &= ~BLIND + M.eye_blind = 0 + if(M.ear_damage <= 25) + if(prob(30)) + M.ear_deaf = 0 ..() return + /datum/chemical_reaction/oculine name = "Oculine" id = "oculine" diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm index 02e1f4a65cd..809a8dfd34d 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm +++ b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm @@ -30,13 +30,6 @@ result_amount = 2 mix_message = "The solvent extracts an antibiotic compound from the fungus." - audioline - name = "Audioline" - id = "audioline" - result = "audioline" - required_reagents = list("spaceacillin" = 1, "salglu_solution" = 1, "epinephrine" = 1) - result_amount = 3 - rezadone name = "Rezadone" id = "rezadone" diff --git a/code/modules/reagents/oldchem/reagents/reagents_med.dm b/code/modules/reagents/oldchem/reagents/reagents_med.dm index 696fa6354a5..a9f2d48bb19 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_med.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_med.dm @@ -61,20 +61,6 @@ ..() return -/datum/reagent/audioline - name = "Audioline" - id = "audioline" - description = "Heals ear damage." - reagent_state = LIQUID - color = "#6600FF" // rgb: 100, 165, 255 - -/datum/reagent/audioline/on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.ear_damage = 0 - M.ear_deaf = 0 - ..() - return - /datum/reagent/mitocholide name = "Mitocholide" id = "mitocholide" @@ -91,7 +77,7 @@ for(var/name in H.internal_organs_by_name) var/obj/item/organ/I = H.internal_organs_by_name[name] if(I.damage > 0) - I.damage -= 0.20 + I.damage = max(I.damage-0.4, 0) ..() return diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 6fe84897c3b..6b29f969743 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -150,6 +150,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) for(var/obj/item/organ/I in affected.internal_organs) + if(I) + I.surgeryize() if(I && I.damage > 0) if(I.robotic < 2) user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \ @@ -193,7 +195,7 @@ if (!..()) return 0 - + var/obj/item/organ/external/affected = target.get_organ(target_zone) if(!(affected && !(affected.status & ORGAN_ROBOT))) @@ -310,7 +312,7 @@ if(!istype(O)) return 0 - + if((affected.status & ORGAN_ROBOT) && !(O.status & ORGAN_ROBOT)) user << "You cannot install a naked organ into a robotic body." return 2