diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 4bacf2d9e8..27a9338191 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -235,7 +235,9 @@ flavor_text = dna.features["flavor_text"] //Update the flavor_text to use new dna text if(mrace) - set_species(mrace, icon_update=0) + var/datum/species/newrace = new mrace.type + newrace.copy_properties_from(mrace) + set_species(newrace, icon_update=0) if(newreal_name) real_name = newreal_name @@ -396,4 +398,4 @@ value = values return value -/////////////////////////// DNA HELPER-PROCS +/////////////////////////// DNA HELPER-PROCS \ No newline at end of file diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index e76385db59..93c354239b 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -6,7 +6,7 @@ create_mob_html = file2text('html/create_object.html') create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"") - user << browse(replacetext(create_mob_html, "/* ref src */", "\ref[src];[HrefToken()]"), "window=create_mob;size=425x475") + user << browse(create_panel_helper(create_mob_html), "window=create_mob;size=425x475") /proc/randomize_human(mob/living/carbon/human/H) H.gender = pick(MALE, FEMALE) diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm index cb947355b1..73bb998231 100644 --- a/code/modules/admin/create_object.dm +++ b/code/modules/admin/create_object.dm @@ -1,3 +1,8 @@ +/datum/admins/proc/create_panel_helper(template) + var/final_html = replacetext(template, "/* ref src */", "\ref[src];[HrefToken()]") + final_html = replacetext(final_html,"/* hreftokenfield */","[HrefTokenFormField()]") + return final_html + /datum/admins/proc/create_object(mob/user) var/static/create_object_html = null if (!create_object_html) @@ -6,7 +11,7 @@ create_object_html = file2text('html/create_object.html') create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"") - user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src];[HrefToken()]"), "window=create_object;size=425x475") + user << browse(create_panel_helper(create_object_html), "window=create_object;size=425x475") /datum/admins/proc/quick_create_object(mob/user) var/static/list/create_object_forms = list( @@ -23,4 +28,4 @@ html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"") create_object_forms[path] = html_form - user << browse(replacetext(html_form, "/* ref src */", "\ref[src];[HrefToken()]"), "window=qco[path];size=425x475") + user << browse(create_panel_helper(html_form), "window=qco[path];size=425x475") diff --git a/code/modules/admin/create_turf.dm b/code/modules/admin/create_turf.dm index f38b86a7b9..a25c02554e 100644 --- a/code/modules/admin/create_turf.dm +++ b/code/modules/admin/create_turf.dm @@ -6,4 +6,4 @@ create_turf_html = file2text('html/create_object.html') create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"") - user << browse(replacetext(create_turf_html, "/* ref src */", "\ref[src];[HrefToken()]"), "window=create_turf;size=425x475") + user << browse(create_panel_helper(create_turf_html), "window=create_turf;size=425x475") diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 821ed9d7a6..19fa9ce82e 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -111,6 +111,10 @@ randname += " [pick(GLOB.last_names)]" return randname + +//Called when cloning, copies some vars that should be kept +/datum/species/proc/copy_properties_from(datum/species/old_species) + return //Please override this locally if you want to define when what species qualifies for what rank if human authority is enforced. @@ -1721,4 +1725,4 @@ #undef COLD_DAMAGE_LEVEL_1 #undef COLD_DAMAGE_LEVEL_2 -#undef COLD_DAMAGE_LEVEL_3 +#undef COLD_DAMAGE_LEVEL_3 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species_types/abductors.dm b/code/modules/mob/living/carbon/human/species_types/abductors.dm index 18444bb366..80d64b29d4 100644 --- a/code/modules/mob/living/carbon/human/species_types/abductors.dm +++ b/code/modules/mob/living/carbon/human/species_types/abductors.dm @@ -7,3 +7,7 @@ mutanttongue = /obj/item/organ/tongue/abductor var/scientist = 0 // vars to not pollute spieces list with castes var/team = 1 + +/datum/species/abductor/copy_properties_from(datum/species/abductor/old_species) + scientist = old_species.scientist + team = old_species.team diff --git a/code/modules/mob/living/carbon/human/species_types/angel.dm b/code/modules/mob/living/carbon/human/species_types/angel.dm index 7c58ecbf86..dbab6b94eb 100644 --- a/code/modules/mob/living/carbon/human/species_types/angel.dm +++ b/code/modules/mob/living/carbon/human/species_types/angel.dm @@ -18,11 +18,10 @@ if(H.dna && H.dna.species &&((H.dna.features["wings"] != "Angel") && ("wings" in H.dna.species.mutant_bodyparts))) H.dna.features["wings"] = "Angel" H.update_body() - if(ishuman(H)&& !fly) + if(ishuman(H) && !fly) fly = new fly.Grant(H) - /datum/species/angel/on_species_loss(mob/living/carbon/human/H) if(fly) fly.Remove(H) @@ -66,7 +65,7 @@ /datum/action/innate/flight name = "Toggle Flight" check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_STUN - icon_icon = 'icons/mob/actions/actions_items.dmi' + icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "flight" /datum/action/innate/flight/Activate() diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 3319895fe0..60f2e821f2 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -9,7 +9,6 @@ exotic_blood = "slimejelly" damage_overlay_type = "" var/datum/action/innate/regenerate_limbs/regenerate_limbs - toxic_food = NONE liked_food = MEAT /datum/species/jelly/on_species_loss(mob/living/carbon/C) @@ -60,6 +59,7 @@ name = "Regenerate Limbs" check_flags = AB_CHECK_CONSCIOUS button_icon_state = "slimeheal" + icon_icon = 'icons/mob/actions/actions_slime.dmi' background_icon_state = "bg_alien" /datum/action/innate/regenerate_limbs/IsAvailable() @@ -128,7 +128,7 @@ /datum/species/jelly/slime/on_species_gain(mob/living/carbon/C, datum/species/old_species) ..() if(ishuman(C)) -/* slime_split = new + /* slime_split = new slime_split.Grant(C) swap_body = new swap_body.Grant(C) */ @@ -140,6 +140,10 @@ C.faction |= "slime" +//If you're cloned you get your body pool back +/datum/species/jelly/slime/copy_properties_from(datum/species/jelly/slime/old_species) + bodies = old_species.bodies + /datum/species/jelly/slime/spec_life(mob/living/carbon/human/H) if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT) if(prob(5)) @@ -154,6 +158,7 @@ name = "Split Body" check_flags = AB_CHECK_CONSCIOUS button_icon_state = "slimesplit" + icon_icon = 'icons/mob/actions/actions_slime.dmi' background_icon_state = "bg_alien" /datum/action/innate/split_body/IsAvailable() @@ -220,6 +225,7 @@ name = "Swap Body" check_flags = AB_CHECK_CONSCIOUS button_icon_state = "slimeswap" + icon_icon = 'icons/mob/actions/actions_slime.dmi' background_icon_state = "bg_alien" /datum/action/innate/swap_body/Activate() @@ -326,4 +332,4 @@ M.transfer_to(dupe) dupe.visible_message("[dupe] blinks and looks \ around.", - "...and move this one instead.") + "...and move this one instead.") \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm index 2cf1dba0c9..e0afdefd6b 100644 --- a/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm +++ b/code/modules/mob/living/simple_animal/hostile/gorilla/gorilla.dm @@ -67,7 +67,7 @@ var/mob/living/L = target if(prob(80)) var/atom/throw_target = get_edge_target_turf(L, dir) - L.throw_at(throw_target, rand(1,2), 7, src) + L.throw_at(throw_target, rand(1,2), 7, src) else L.Knockdown(20) visible_message("[src] knocks [L] down!") diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index c8fbfd53fa..86fe54aaeb 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -369,23 +369,26 @@ P.original = targeted_atom P.fire() return P - + +/mob/living/simple_animal/hostile/proc/CanSmashTurfs(turf/T) + return iswallturf(T) || ismineralturf(T) /mob/living/simple_animal/hostile/proc/DestroySurroundings() if(environment_smash) EscapeConfinement() for(var/dir in GLOB.cardinals) var/turf/T = get_step(targets_from, dir) - if(iswallturf(T) || ismineralturf(T)) + if(CanSmashTurfs(T)) if(T.Adjacent(targets_from)) T.attack_animal(src) for(var/a in T) var/atom/A = a if(!A.Adjacent(targets_from)) continue - if(is_type_in_typecache(A, environment_target_typecache)) + if(is_type_in_typecache(A, environment_target_typecache) && !A.IsObscured()) A.attack_animal(src) + /mob/living/simple_animal/hostile/proc/EscapeConfinement() if(buckled) buckled.attack_animal(src) diff --git a/html/changelogs/AutoChangeLog-pr-2878.yml b/html/changelogs/AutoChangeLog-pr-2878.yml new file mode 100644 index 0000000000..f2d10a7b30 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2878.yml @@ -0,0 +1,4 @@ +author: "ShizCalev" +delete-after: True +changes: + - tweak: "Gorillas will now drop their brain when gibbed or butchered." diff --git a/html/create_object.html b/html/create_object.html index 44bf7667aa..619da3ec47 100644 --- a/html/create_object.html +++ b/html/create_object.html @@ -26,7 +26,8 @@