diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 8fc97fa5514..b96da7b214c 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -315,14 +315,14 @@ var/global/list/datum/dna/gene/dna_genes[0] return add_zero2(num2hex(value,1), 3) /datum/dna/proc/UpdateUI() - src.unique_enzymes="" + src.uni_identity="" for(var/block in UI) uni_identity += EncodeDNABlock(block) //testing("New UI: [uni_identity]") dirtyUI=0 /datum/dna/proc/UpdateSE() -// var/oldse=struc_enzymes + //var/oldse=struc_enzymes struc_enzymes="" for(var/block in SE) struc_enzymes += EncodeDNABlock(block) @@ -356,4 +356,4 @@ var/global/list/datum/dna/gene/dna_genes[0] ResetSE() unique_enzymes = md5(character.real_name) - reg_dna[unique_enzymes] = character.real_name + reg_dna[unique_enzymes] = character.real_name \ No newline at end of file diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index d7a98d57255..4fcc43fbf91 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -170,4 +170,3 @@ // Used below, simple injection modifier. /proc/probinj(var/pr, var/inj) return prob(pr+inj*pr) - diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 6128693e43f..a5ef01b80d1 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -122,8 +122,72 @@ src.add_fingerprint(usr) return +/obj/machinery/dna_scannernew/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) + if(O.loc == user) //no you can't pull things out of your ass + return + if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other + return + if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source + return + if(!ismob(O)) //humans only + return + if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit + return + if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper + return + if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems + return + if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc? + return + if(occupant) + user << "\blue The DNA Scanner is already occupied!" + return + if(isrobot(user)) + if(!istype(user:module, /obj/item/weapon/robot_module/medical)) + user << "You do not have the means to do this!" + return + var/mob/living/L = O + if(!istype(L) || L.buckled) + return + if(L.abiotic()) + user << "\red Subject cannot have abiotic items on." + return + for(var/mob/living/carbon/slime/M in range(1,L)) + if(M.Victim == L) + usr << "[L.name] will not fit into the DNA Scanner because they have a slime latched onto their head." + return + if(L == user) + return + visible_message("[user] puts [L.name] into the DNA Scanner.", 3) + put_in(L) + /obj/machinery/dna_scannernew/attackby(var/obj/item/weapon/item as obj, var/mob/user as mob) - if(istype(item, /obj/item/weapon/reagent_containers/glass)) + if (istype(item, /obj/item/weapon/screwdriver)) + if (!opened) + src.opened = 1 + user << "You open the maintenance hatch of [src]." + //src.icon_state = "autolathe_t" + else + src.opened = 0 + user << "You close the maintenance hatch of [src]." + //src.icon_state = "autolathe" + return 1 + else if(istype(item, /obj/item/weapon/crowbar)) + if (occupant) + user << "\red You cannot disassemble this [src], it's occupado." + return 1 + if (opened) + playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) + var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc) + M.state = 2 + M.icon_state = "box_1" + for(var/obj/I in component_parts) + if(I.reliability != 100 && crit_fail) + I.crit_fail = 1 + I.loc = src.loc + del(src) + return + else if(istype(item, /obj/item/weapon/reagent_containers/glass)) if(beaker) user << "\red A beaker is already loaded into the machine." return @@ -144,7 +208,12 @@ if (G.affecting.abiotic()) user << "\blue Subject cannot have abiotic items on." return - var/mob/M = G.affecting + put_in(G.affecting) + src.add_fingerprint(user) + del(G) + return + +/obj/machinery/dna_scannernew/proc/put_in(var/mob/M) if(M.client) M.client.perspective = EYE_PERSPECTIVE M.client.eye = src @@ -152,8 +221,6 @@ src.occupant = M src.icon_state = "scanner_1" - src.add_fingerprint(user) - // search for ghosts, if the corpse is empty and the scanner is connected to a cloner if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \ || locate(/obj/machinery/computer/cloning, get_step(src, SOUTH)) \ @@ -161,18 +228,10 @@ || locate(/obj/machinery/computer/cloning, get_step(src, WEST))) if(!M.client && M.mind) - message_admins("No client found, searching for compatible mind") - for(var/mob/C in respawnable_list) - if(C.mind && C.mind.key == M.mind.key) - message_admins("Found mind, asking for respawn") - switch(alert(C,"Your corpse has been placed into a cloning scanner. Do you want to be resurrected/cloned? Please not if you select 'No', you will be able to be cloned or borged again this round.","Clone Alert","Yes","No")) - if("Yes") - M.key = C.key - return - if("No") - return - - del(G) + for(var/mob/dead/observer/ghost in player_list) + if(ghost.mind == M.mind) + ghost << "Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned! (Verbs -> Ghost -> Re-enter corpse)" + break return /obj/machinery/dna_scannernew/proc/go_out() @@ -283,7 +342,7 @@ I.loc = src src.disk = I user << "You insert [I]." - nanomanager.update_uis(src) // update all UIs attached to src + nanomanager.update_uis(src) // update all UIs attached to src() return else src.attack_hand(user) @@ -355,7 +414,7 @@ W.loc = src src.disk = W user << "You insert [W]." - nanomanager.update_uis(src) // update all UIs attached to src + nanomanager.update_uis(src) // update all UIs attached to src() /* /obj/machinery/computer/scan_consolenew/process() //not really used right now if(stat & (NOPOWER|BROKEN)) @@ -368,6 +427,7 @@ ui_interact(user) /obj/machinery/computer/scan_consolenew/attack_ai(user as mob) + src.add_hiddenprint(user) ui_interact(user) /obj/machinery/computer/scan_consolenew/attack_hand(user as mob) @@ -377,7 +437,7 @@ /** * The ui_interact proc is used to open and update Nano UIs * If ui_interact is not used then the UI will not update correctly - * ui_interact is currently defined for /atom/movable (which is inherited by /obj and /mob) + * ui_interact is currently defined for /atom/movable * * @param user /mob The mob who is interacting with this ui * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index 38c12c4dd22..7ddfd82cb79 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -63,9 +63,6 @@ M.verbs += /mob/living/carbon/human/proc/morph - OnDrawUnderlays(var/mob/M,var/g,var/fat) - return "cold[fat]_s" - /datum/dna/gene/basic/cold_resist name="Cold Resistance" activation_messages=list("Your body is filled with warmth.") @@ -165,4 +162,4 @@ block=TELEBLOCK OnDrawUnderlays(var/mob/M,var/g,var/fat) - return "telekinesishead[fat]_s" + return "telekinesishead[fat]_s" \ 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 1a67a0e4068..07ddce55e2a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -57,9 +57,8 @@ ..() /mob/living/carbon/human/New() - if(!species) - set_species("Human") + set_species() if(species.language) var/datum/language/L = all_languages[species.language] @@ -72,6 +71,7 @@ if(!dna) dna = new /datum/dna(null) + dna.species=species.name for(var/i=0;i<7;i++) // 2 for medHUDs and 5 for secHUDs hud_list += image('icons/mob/hud.dmi', src, "hudunknown") @@ -82,10 +82,10 @@ dna.real_name = real_name prev_gender = gender // Debug for plural genders - make_organs() make_blood() + /mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes) if ((!( yes ) || now_pushing)) return @@ -1346,36 +1346,39 @@ mob/living/carbon/human/yank_out_object() else usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]." -/mob/living/carbon/human/proc/set_species(var/new_species) +/mob/living/carbon/human/proc/set_species(var/new_species,var/on_spawn=0) - if(!new_species) - new_species = dna.species + if(!dna) + if(!new_species) + new_species = "Human" else - dna.species = new_species + if(!new_species) + new_species = dna.species + else + dna.species = new_species if(species && (species.name && species.name == new_species)) - return 1 + return + + if(species && species.language) + remove_language(species.language) species = all_species[new_species] + if(species.language) + add_language(species.language) + see_in_dark = species.darksight if(see_in_dark > 2) see_invisible = SEE_INVISIBLE_LEVEL_ONE else see_invisible = SEE_INVISIBLE_LIVING - if(species.name=="Slime People") dna.mutantrace = "slime" - if(species.default_mutations.len>0) - var/needs_update=0 - for(var/mutation in species.default_mutations) - if(!(mutation in mutations)) - mutations.Add(mutation) - needs_update=1 - if(needs_update) - check_mutations=1 // Can't check here or shit will happen. Bad shit. + if(species.default_mutations.len>0 || species.default_blocks.len>0) + do_deferred_species_setup=1 spawn(0) update_icons()