Merge pull request #2447 from Citadel-Station-13/upstream-merge-29923

[MIRROR] Gorillas
This commit is contained in:
LetterJay
2017-08-28 10:32:41 -05:00
committed by GitHub
15 changed files with 316 additions and 15 deletions
@@ -225,6 +225,11 @@
tastes = list("meat" = 1, "wheat" = 1)
foodtype = GRAIN
/obj/item/reagent_containers/food/snacks/meat/slab/gorilla
name = "gorilla meat"
desc = "Much meatier than monkey meat."
list_reagents = list("nutriment" = 5, "vitamin" = 1)
/obj/item/reagent_containers/food/snacks/meat/rawbacon
name = "raw piece of bacon"
desc = "A raw piece of bacon."
@@ -0,0 +1,13 @@
diff a/code/modules/food_and_drinks/food/snacks/meat.dm b/code/modules/food_and_drinks/food/snacks/meat.dm (rejected hunks)
@@ -225,6 +225,11 @@
tastes = list("meat" = 1, "wheat" = 1)
foodtype = GRAIN
+/obj/item/weapon/reagent_containers/food/snacks/meat/slab/gorilla
+ name = "gorilla meat"
+ desc = "Much meatier than monkey meat."
+ list_reagents = list("nutriment" = 5, "vitamin" = 1)
+
/obj/item/weapon/reagent_containers/food/snacks/meat/rawbacon
name = "raw piece of bacon"
desc = "A raw piece of bacon."
+9 -10
View File
@@ -23,23 +23,22 @@
walk_to(src,0)
/mob/living/carbon/monkey/handle_mutations_and_radiation()
if (radiation)
if (radiation > 100)
if(!IsKnockdown())
emote("collapse")
Knockdown(200)
to_chat(src, "<span class='danger'>You feel weak.</span>")
if(radiation)
if(radiation > 100)
if(!IsKnockdown())
emote("collapse")
Knockdown(200)
to_chat(src, "<span class='danger'>You feel weak.</span>")
if(radiation > 30 && prob((radiation - 30) * (radiation - 30) * 0.002))
gorillize()
return
switch(radiation)
if(50 to 75)
if(prob(5))
if(!IsKnockdown())
emote("collapse")
Knockdown(60)
to_chat(src, "<span class='danger'>You feel weak.</span>")
if(75 to 100)
if(prob(1))
to_chat(src, "<span class='danger'>You mutate!</span>")
+10
View File
@@ -0,0 +1,10 @@
diff a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm (rejected hunks)
@@ -793,7 +793,7 @@
else
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
-/mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G)
+/mob/living/proc/can_use_guns(var/obj/item/weapon/G)
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 0
@@ -0,0 +1,11 @@
/datum/emote/sound/gorilla
mob_type_allowed_typecache = /mob/living/simple_animal/hostile/gorilla
mob_type_blacklist_typecache = list()
/datum/emote/sound/gorilla/ooga
key = "ooga"
key_third_person = "oogas"
message = "oogas."
message_param = "oogas at %t."
sound = "sound/creatures/gorilla.ogg"
@@ -0,0 +1,77 @@
#define GORILLA_HANDS_LAYER 1
#define GORILLA_TOTAL_LAYERS 1
/mob/living/simple_animal/hostile/gorilla
name = "Gorilla"
desc = "A ground-dwelling, predominantly herbivorous ape that inhabits the forests of central Africa."
icon = 'icons/mob/gorilla.dmi'
icon_state = "crawling"
icon_state = "crawling"
icon_living = "crawling"
icon_dead = "dead"
speak_chance = 80
maxHealth = 220
health = 220
loot = list(/obj/effect/gibspawner/generic)
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/gorilla = 4)
response_help = "prods"
response_disarm = "challenges"
response_harm = "thumps"
speed = 1
melee_damage_lower = 15
melee_damage_upper = 18
damage_coeff = list(BRUTE = 1, BURN = 1.5, TOX = 1.5, CLONE = 0, STAMINA = 0, OXY = 1.5)
obj_damage = 20
environment_smash = 2
attacktext = "pummels"
attack_sound = 'sound/weapons/punch1.ogg'
dextrous = TRUE
possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM)
faction = list("jungle")
robust_searching = TRUE
stat_attack = UNCONSCIOUS
minbodytemp = 270
maxbodytemp = 350
var/list/gorilla_overlays[GORILLA_TOTAL_LAYERS]
// Gorillas like to dismember limbs from unconcious mobs.
// Returns null when the target is not an unconcious carbon mob; a list of limbs (possibly empty) otherwise.
/mob/living/simple_animal/hostile/gorilla/proc/target_bodyparts(atom/the_target)
var/list/parts = list()
if(iscarbon(the_target))
var/mob/living/carbon/C = the_target
if(C.stat >= UNCONSCIOUS)
for(var/X in C.bodyparts)
var/obj/item/bodypart/BP = X
if(BP.body_part != HEAD && BP.body_part != CHEST)
if(BP.dismemberable)
parts += BP
return parts
/mob/living/simple_animal/hostile/gorilla/AttackingTarget()
var/list/parts = target_bodyparts(target)
if(parts)
if(!parts.len)
return FALSE
var/obj/item/bodypart/BP = pick(parts)
BP.dismember()
return ..()
. = ..()
if(. && isliving(target))
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)
else
L.Knockdown(20)
visible_message("<span class='danger'>[src] knocks [L] down!</span>")
/mob/living/simple_animal/hostile/gorilla/CanAttack(atom/the_target)
var/list/parts = target_bodyparts(target)
return ..() && !istype(the_target, /mob/living/carbon/monkey) && (!parts || parts.len > 3)
/mob/living/simple_animal/hostile/gorilla/handle_automated_speech(override)
if(speak_chance && (override || prob(speak_chance)))
playsound(src, "sound/creatures/gorilla.ogg", 200)
..()
@@ -0,0 +1,55 @@
/mob/living/simple_animal/hostile/gorilla/proc/apply_overlay(cache_index)
. = gorilla_overlays[cache_index]
if(.)
add_overlay(.)
/mob/living/simple_animal/hostile/gorilla/proc/remove_overlay(cache_index)
var/I = gorilla_overlays[cache_index]
if(I)
cut_overlay(I)
gorilla_overlays[cache_index] = null
/mob/living/simple_animal/hostile/gorilla/update_inv_hands()
cut_overlays("standing_overlay")
remove_overlay(GORILLA_HANDS_LAYER)
var/standing = FALSE
for(var/I in held_items)
if(I)
standing = TRUE
break
if(!standing)
if(stat != DEAD)
icon_state = "crawling"
speed = 1
return ..()
if(stat != DEAD)
icon_state = "standing"
speed = 3 // Gorillas are slow when standing up.
var/list/hands_overlays = list()
var/obj/item/l_hand = get_item_for_held_index(1)
var/obj/item/r_hand = get_item_for_held_index(2)
if(r_hand)
var/r_state = r_hand.item_state ? r_hand.item_state : r_hand.icon_state
var/mutable_appearance/r_hand_overlay = r_hand.build_worn_icon(state = r_state, default_layer = GORILLA_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
r_hand_overlay.pixel_y -= 1
hands_overlays += r_hand_overlay
if(l_hand)
var/l_state = l_hand.item_state ? l_hand.item_state : l_hand.icon_state
var/mutable_appearance/l_hand_overlay = l_hand.build_worn_icon(state = l_state, default_layer = GORILLA_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
l_hand_overlay.pixel_y -= 1
hands_overlays += l_hand_overlay
if(hands_overlays.len)
gorilla_overlays[GORILLA_HANDS_LAYER] = hands_overlays
apply_overlay(GORILLA_HANDS_LAYER)
add_overlay("standing_overlay")
return ..()
/mob/living/simple_animal/hostile/gorilla/regenerate_icons()
update_inv_hands()
@@ -386,14 +386,14 @@
else
..()
/mob/living/simple_animal/update_canmove()
/mob/living/simple_animal/update_canmove(value_otherwise = TRUE)
if(IsUnconscious() || IsStun() || IsKnockdown() || stat || resting)
drop_all_held_items()
canmove = 0
canmove = FALSE
else if(buckled)
canmove = 0
canmove = FALSE
else
canmove = 1
canmove = value_otherwise
update_transform()
update_action_buttons_icon()
return canmove
+24
View File
@@ -495,6 +495,30 @@
. = new_corgi
qdel(src)
/mob/living/carbon/proc/gorillize()
if(notransform)
return
var/Itemlist = get_equipped_items()
Itemlist += held_items
for(var/obj/item/W in Itemlist)
dropItemToGround(W, TRUE)
regenerate_icons()
notransform = TRUE
canmove = FALSE
icon = null
invisibility = INVISIBILITY_MAXIMUM
var/mob/living/simple_animal/hostile/gorilla/new_gorilla = new (get_turf(src))
new_gorilla.a_intent = INTENT_HARM
if(mind)
mind.transfer_to(new_gorilla)
else
new_gorilla.key = key
to_chat(new_gorilla, "<B>You are now a gorilla. Ooga ooga!</B>")
. = new_gorilla
qdel(src)
/mob/living/carbon/human/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_animal)
+3 -1
View File
@@ -165,7 +165,7 @@
if("animal")
var/path
if(prob(50))
var/beast = pick("carp","bear","mushroom","statue", "bat", "goat","killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp", "watcher", "goliath", "headcrab", "morph", "stickman", "stickdog", "lesserdragon")
var/beast = pick("carp","bear","mushroom","statue", "bat", "goat","killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp", "watcher", "goliath", "headcrab", "morph", "stickman", "stickdog", "lesserdragon", "gorilla")
switch(beast)
if("carp")
path = /mob/living/simple_animal/hostile/carp
@@ -205,6 +205,8 @@
path = /mob/living/simple_animal/hostile/stickman/dog
if("lesserdragon")
path = /mob/living/simple_animal/hostile/megafauna/dragon/lesser
if("gorilla")
path = /mob/living/simple_animal/hostile/gorilla
else
var/animal = pick("parrot","corgi","crab","pug","cat","mouse","chicken","cow","lizard","chick","fox","butterfly","cak")
switch(animal)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.
+3
View File
@@ -1802,6 +1802,9 @@
#include "code\modules\mob\living\simple_animal\hostile\wumborian_fugu.dm"
#include "code\modules\mob\living\simple_animal\hostile\bosses\boss.dm"
#include "code\modules\mob\living\simple_animal\hostile\bosses\paperwizard.dm"
#include "code\modules\mob\living\simple_animal\hostile\gorilla\emotes.dm"
#include "code\modules\mob\living\simple_animal\hostile\gorilla\gorilla.dm"
#include "code\modules\mob\living\simple_animal\hostile\gorilla\visuals_icons.dm"
#include "code\modules\mob\living\simple_animal\hostile\megafauna\blood_drunk_miner.dm"
#include "code\modules\mob\living\simple_animal\hostile\megafauna\bubblegum.dm"
#include "code\modules\mob\living\simple_animal\hostile\megafauna\colossus.dm"
+102
View File
@@ -0,0 +1,102 @@
diff a/tgstation.dme b/tgstation.dme (rejected hunks)
@@ -765,73 +812,6 @@
#include "code\game\objects\items\devices\radio\headset.dm"
#include "code\game\objects\items\devices\radio\intercom.dm"
#include "code\game\objects\items\devices\radio\radio.dm"
-#include "code\game\objects\items\robot\ai_upgrades.dm"
-#include "code\game\objects\items\robot\robot_items.dm"
-#include "code\game\objects\items\robot\robot_parts.dm"
-#include "code\game\objects\items\robot\robot_upgrades.dm"
-#include "code\game\objects\items\stacks\bscrystal.dm"
-#include "code\game\objects\items\stacks\cash.dm"
-#include "code\game\objects\items\stacks\medical.dm"
-#include "code\game\objects\items\stacks\rods.dm"
-#include "code\game\objects\items\stacks\stack.dm"
-#include "code\game\objects\items\stacks\telecrystal.dm"
-#include "code\game\objects\items\stacks\wrap.dm"
-#include "code\game\objects\items\stacks\sheets\glass.dm"
-#include "code\game\objects\items\stacks\sheets\leather.dm"
-#include "code\game\objects\items\stacks\sheets\light.dm"
-#include "code\game\objects\items\stacks\sheets\mineral.dm"
-#include "code\game\objects\items\stacks\sheets\sheet_types.dm"
-#include "code\game\objects\items\stacks\sheets\sheets.dm"
-#include "code\game\objects\items\stacks\tiles\light.dm"
-#include "code\game\objects\items\stacks\tiles\tile_mineral.dm"
-#include "code\game\objects\items\stacks\tiles\tile_types.dm"
-#include "code\game\objects\items\AI_modules.dm"
-#include "code\game\objects\items\airlock_painter.dm"
-#include "code\game\objects\items\cards_ids.dm"
-#include "code\game\objects\items\charter.dm"
-#include "code\game\objects\items\chrono_eraser.dm"
-#include "code\game\objects\items\cigs_lighters.dm"
-#include "code\game\objects\items\clown_items.dm"
-#include "code\game\objects\items\cosmetics.dm"
-#include "code\game\objects\items\courtroom.dm"
-#include "code\game\objects\items\defib.dm"
-#include "code\game\objects\items\dice.dm"
-#include "code\game\objects\items\dna_injector.dm"
-#include "code\game\objects\items\extinguisher.dm"
-#include "code\game\objects\items\flamethrower.dm"
-#include "code\game\objects\items\gift.dm"
-#include "code\game\objects\items\handcuffs.dm"
-#include "code\game\objects\items\his_grace.dm"
-#include "code\game\objects\items\holosign_creator.dm"
-#include "code\game\objects\items\holy_weapons.dm"
-#include "code\game\objects\items\inducer.dm"
-#include "code\game\objects\items\kitchen.dm"
-#include "code\game\objects\items\manuals.dm"
-#include "code\game\objects\items\miscellaneous.dm"
-#include "code\game\objects\items\mop.dm"
-#include "code\game\objects\items\paint.dm"
-#include "code\game\objects\items\paiwire.dm"
-#include "code\game\objects\items\pneumaticCannon.dm"
-#include "code\game\objects\items\powerfist.dm"
-#include "code\game\objects\items\RCD.dm"
-#include "code\game\objects\items\RCL.dm"
-#include "code\game\objects\items\RPD.dm"
-#include "code\game\objects\items\RSF.dm"
-#include "code\game\objects\items\scrolls.dm"
-#include "code\game\objects\items\sharpener.dm"
-#include "code\game\objects\items\shields.dm"
-#include "code\game\objects\items\signs.dm"
-#include "code\game\objects\items\singularityhammer.dm"
-#include "code\game\objects\items\stunbaton.dm"
-#include "code\game\objects\items\teleportation.dm"
-#include "code\game\objects\items\teleprod.dm"
-#include "code\game\objects\items\tools.dm"
-#include "code\game\objects\items\twohanded.dm"
-#include "code\game\objects\items\vending_items.dm"
-#include "code\game\objects\items\weaponry.dm"
-#include "code\game\objects\items\circuitboards\circuitboard.dm"
-#include "code\game\objects\items\circuitboards\computer_circuitboards.dm"
-#include "code\game\objects\items\circuitboards\machine_circuitboards.dm"
#include "code\game\objects\items\grenades\chem_grenade.dm"
#include "code\game\objects\items\grenades\clusterbuster.dm"
#include "code\game\objects\items\grenades\emgrenade.dm"
@@ -863,6 +843,26 @@
#include "code\game\objects\items\melee\energy.dm"
#include "code\game\objects\items\melee\misc.dm"
#include "code\game\objects\items\melee\transforming.dm"
+#include "code\game\objects\items\robot\ai_upgrades.dm"
+#include "code\game\objects\items\robot\robot_items.dm"
+#include "code\game\objects\items\robot\robot_parts.dm"
+#include "code\game\objects\items\robot\robot_upgrades.dm"
+#include "code\game\objects\items\stacks\bscrystal.dm"
+#include "code\game\objects\items\stacks\cash.dm"
+#include "code\game\objects\items\stacks\medical.dm"
+#include "code\game\objects\items\stacks\rods.dm"
+#include "code\game\objects\items\stacks\stack.dm"
+#include "code\game\objects\items\stacks\telecrystal.dm"
+#include "code\game\objects\items\stacks\wrap.dm"
+#include "code\game\objects\items\stacks\sheets\glass.dm"
+#include "code\game\objects\items\stacks\sheets\leather.dm"
+#include "code\game\objects\items\stacks\sheets\light.dm"
+#include "code\game\objects\items\stacks\sheets\mineral.dm"
+#include "code\game\objects\items\stacks\sheets\sheet_types.dm"
+#include "code\game\objects\items\stacks\sheets\sheets.dm"
+#include "code\game\objects\items\stacks\tiles\light.dm"
+#include "code\game\objects\items\stacks\tiles\tile_mineral.dm"
+#include "code\game\objects\items\stacks\tiles\tile_types.dm"
#include "code\game\objects\items\storage\backpack.dm"
#include "code\game\objects\items\storage\bags.dm"
#include "code\game\objects\items\storage\belt.dm"