Merge remote-tracking branch 'upstream/master' into markings-and-more

This commit is contained in:
Dahlular
2022-05-14 22:07:39 -06:00
143 changed files with 4694 additions and 2627 deletions
@@ -0,0 +1,154 @@
/*
COSMETIC PARTS
this system allows you to change the _base_ appearance of a limb independent
of species or markings. this, for example, allows us to create "hybrids" like a
mammal with avian legs.
keep in mind that this does not change the species of a leg! in the above example,
the mammal's bird-legs are still mammal legs. this matters in some places, like
body part transplants; mis-matched species will cause extra damage if the surgery
fails and the part is rejected. so you can't attach mammal-bird legs to avians
safely.
*/
/datum/cosmetic_part
/** A unique string that is used to identify this part for save files. Allows name changes without breaking saves */
var/id
/** The name of the cosmetic part. This shows up in the preferences dropdown. */
var/name
var/icon = 'hyperstation/icons/mob/char_parts.dmi'
var/icon_state
/** How colors are determined for this part. MUTCOLORS for base color, MATRIXED to allow multiple channels. */
var/color_src = MUTCOLORS
/** Whether or not this cosmetic part has an alternate form for digitigrade legs. */
var/support_digitigrade = TRUE
/** Species IDs that support this cosmetic part. Bypassed with "show mismatched markings" option. */
var/list/supported_species
/datum/cosmetic_part/head
/datum/cosmetic_part/chest
/datum/cosmetic_part/arms
/datum/cosmetic_part/legs
// HEADS
// =========================================
/datum/cosmetic_part/head/default
id = "default"
name = "default"
icon = null
/datum/cosmetic_part/head/ipc_round
id = "ipc_round"
name = "round ipc head"
icon_state = "ipc_round"
supported_species = list("ipc")
// CHESTS
// =========================================
/datum/cosmetic_part/chest/default
id = "default"
name = "default"
icon = null
/datum/cosmetic_part/chest/ipc_sleek
id = "ipc_sleek"
name = "sleek ipc chest"
icon_state = "ipc_sleek"
supported_species = list("ipc")
color_src = MATRIXED
/datum/cosmetic_part/chest/ipc_jointed
id = "ipc_jointed"
name = "jointed ipc chest"
icon_state = "ipc_jointed"
supported_species = list("ipc")
color_src = MATRIXED
// ARMS
// =========================================
/datum/cosmetic_part/arms/default
id = "default"
name = "default"
icon = null
/datum/cosmetic_part/arms/avian_alt
id = "avian_alt"
name = "avian claws"
icon_state = "avian_alt"
supported_species = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
/datum/cosmetic_part/arms/insect
id = "insect"
name = "insect arms"
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
icon_state = "insect"
supported_species = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
/datum/cosmetic_part/arms/ipc_sleek
id = "ipc_sleek"
name = "sleek ipc arms"
icon_state = "ipc_sleek"
supported_species = list("ipc")
color_src = MATRIXED
/datum/cosmetic_part/arms/ipc_jointed
id = "ipc_jointed"
name = "jointed ipc arms"
icon_state = "ipc_jointed"
supported_species = list("ipc")
color_src = MATRIXED
// LEGS
// =========================================
/datum/cosmetic_part/legs/default
id = "default"
name = "default"
icon = null
/datum/cosmetic_part/legs/avian
id = "avian"
name = "avian legs"
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
icon_state = "avian"
supported_species = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
support_digitigrade = FALSE
/datum/cosmetic_part/legs/mammal
id = "mammal"
name = "mammal legs"
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
icon_state = "mammal"
supported_species = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
support_digitigrade = TRUE
/datum/cosmetic_part/legs/insect
id = "insect"
name = "insect legs"
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
icon_state = "insect"
supported_species = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
support_digitigrade = TRUE
/datum/cosmetic_part/legs/ipc_sleek
id = "ipc_sleek"
name = "sleek ipc legs"
icon_state = "ipc_sleek"
supported_species = list("ipc")
color_src = MATRIXED
support_digitigrade = FALSE
/datum/cosmetic_part/legs/ipc_jointed
id = "ipc_jointed"
name = "jointed ipc legs"
icon_state = "ipc_jointed"
supported_species = list("ipc")
color_src = MATRIXED
support_digitigrade = FALSE
@@ -437,6 +437,12 @@ from modular_citadel/code/modules/mob/dead/new_player/sprite_accessories.dm:
name = "RadDog (Hyper)"
icon_state = "chemlight"
icon = 'hyperstation/icons/mob/char_markings.dmi'
//racc do a code maybe it won't explode
/datum/sprite_accessory/mam_body_markings/raccalt
name = "RaccAlt (Hyper)"
icon_state = "raccalt"
icon = 'hyperstation/icons/mob/char_markings.dmi'
/*
TAUR BODIES
@@ -469,6 +475,92 @@ from modular_citadel/code/modules/mob/dead/new_player/sprite_accessories.dm:
taur_mode = PAW_TAURIC
ckeys_allowed = list("chemlight")
/*
IPCS
==========================================================
*/
/*
from modular_citadel/code/modules/mob/dead/new_player/sprite_accessories.dm:
/datum/sprite_accessory/antenna
icon = 'modular_citadel/icons/mob/ipc_antennas.dmi'
color_src = MUTCOLORS3
recommended_species = list("ipc")
/datum/sprite_accessory/screen
icon = 'modular_citadel/icons/mob/ipc_screens.dmi'
color_src = null
*/
/datum/sprite_accessory/antenna/idog_down
name = "Dog, down (Hyper)"
icon_state = "idog_down"
color_src = MATRIXED
/datum/sprite_accessory/antenna/idog_up
name = "Dog, up (Hyper)"
icon_state = "idog_up"
color_src = MATRIXED
/datum/sprite_accessory/antenna/headset
name = "Headphones (Hyper)"
icon_state = "headset"
color_src = MATRIXED
/datum/sprite_accessory/antenna/aquatic
name = "Fins (Hyper)"
icon_state = "aquatic"
color_src = MATRIXED
/datum/sprite_accessory/screen/ghost
name = "Ghost (Hyper)"
icon_state = "ghost"
/datum/sprite_accessory/screen/heartbeat
name = "Heartbeat (Hyper)"
icon_state = "heartbeat"
/datum/sprite_accessory/screen/ocean
name = "Ocean (Hyper)"
icon_state = "ocean"
/datum/sprite_accessory/antenna/catears
name = "Pointy Ears (Hyper)"
icon_state = "catears"
color_src = MATRIXED
/datum/sprite_accessory/screen/valley
name = "Valley (Hyper)"
icon_state = "valley"
/datum/sprite_accessory/screen/visor
name = "Black Visor (Hyper)"
icon = 'hyperstation/icons/mob/ipc_screen_visor.dmi'
icon_state = "visor_black"
/datum/sprite_accessory/screen/visor/blue
name = "Blue Visor (Hyper)"
icon_state = "visor_blue"
/datum/sprite_accessory/screen/visor/green
name = "Green Visor (Hyper)"
icon_state = "visor_green"
/datum/sprite_accessory/screen/visor/red
name = "Red Visor (Hyper)"
icon_state = "visor_red"
/datum/sprite_accessory/screen/visor/white
name = "White Visor (Hyper)"
icon_state = "visor_white"
/datum/sprite_accessory/screen/visor/yellow
name = "Yellow Visor (Hyper)"
icon_state = "visor_yellow"
/*
HAIRSTYLES
==========================================================
@@ -13,6 +13,11 @@
/mob/living/carbon/handle_status_effects()
..()
handle_pain()
/mob/living/carbon/has_mouth()
var/obj/item/bodypart/head/head = get_bodypart(BODY_ZONE_HEAD)
if(head && head.mouth)
return TRUE
/mob/living/carbon/proc/handle_pain()
var/pain_amount = 0
@@ -97,7 +102,7 @@
stuttering += 3 //stutter words
//if they are asleep, this wont trigger.
if (total_pain > 110 && stat == 0) //taking 77 all damage at once from full health, will put you into shock and kill you. This cant be achived with chip damage (or fist fights), because youll die before you reach this pain level.
if (total_pain > 120 && stat == 0) //taking 130 all damage at once from full health, will put you into shock and kill you. This cant be achived with chip damage (or fist fights), because youll die before you reach this pain level.
if(prob(50))
emote("scream")//scream
to_chat(src, "<span class='big warning'>You give into the pain...</span>")
@@ -0,0 +1,17 @@
/obj/item/bodypart/proc/apply_cosmetic(datum/cosmetic_part/part)
if(!is_organic_limb() || animal_origin || !part)
return
cosmetic_icon = part
/mob/living/carbon/human/proc/handle_cosmetic_parts()
var/features = dna.features
var/list/body_zones = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
for(var/zone in body_zones)
var/datum/cosmetic_part/cosmetic_pref = features["cosmetic_" + zone]
if(!istype(cosmetic_pref, /datum/cosmetic_part))
continue
var/datum/cosmetic_part/part = cosmetic_pref
var/obj/item/bodypart/body_part = get_bodypart(zone)
if(body_part && part)
body_part.apply_cosmetic(part)
@@ -0,0 +1,58 @@
// APC powercord: oracle port
/obj/item/apc_powercord
name = "power cord"
desc = "An internal power cord hooked up to a battery. Useful if you run on electricity. Not so much otherwise."
icon = 'icons/obj/power.dmi'
icon_state = "wire1"
/obj/item/apc_powercord/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
if(!istype(target, /obj/machinery/power/apc) || !ishuman(user) || !proximity_flag)
return ..()
user.changeNext_move(CLICK_CD_MELEE)
var/mob/living/carbon/human/H = user
var/obj/item/organ/stomach/cell/battery = H.getorganslot(ORGAN_SLOT_STOMACH)
if(!battery)
to_chat(H, "<span class='warning'>You try to siphon energy from \the [target], but your power cell is gone!</span>")
return
if(istype(H) && H.nutrition >= NUTRITION_LEVEL_ALMOST_FULL)
to_chat(user, "<span class='warning'>You are already fully charged!</span>")
return
if(istype(target, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = target
if(A.cell && A.cell.charge > A.cell.maxcharge*0.25)
powerdraw_loop(A, H)
return
else
to_chat(user, "<span class='warning'>There is not enough charge to draw from that APC.</span>")
return
/obj/item/apc_powercord/proc/powerdraw_loop(obj/machinery/power/apc/A, mob/living/carbon/human/H)
H.visible_message("<span class='notice'>[H] inserts a power connector into the [A].</span>", "<span class='notice'>You begin to draw power from the [A].</span>")
while(do_after(H, 10, target = A))
if(!istype(A))
return
if(loc != H)
to_chat(H, "<span class='warning'>You must keep your connector out while charging!</span>")
break
if(A.cell.charge == 0)
to_chat(H, "<span class='warning'>The [A] doesn't have enough charge to spare.</span>")
break
A.charging = 1
if(A.cell.charge >= 500)
H.nutrition += 50
A.cell.charge -= 250
to_chat(H, "<span class='notice'>You siphon off some of the stored charge for your own use.</span>")
else
H.nutrition += A.cell.charge/10
A.cell.charge = 0
to_chat(H, "<span class='notice'>You siphon off as much as the [A] can spare.</span>")
break
if(H.nutrition > NUTRITION_LEVEL_WELL_FED)
to_chat(H, "<span class='notice'>You are now fully charged.</span>")
break
H.visible_message("<span class='notice'>[H] unplugs from the [A].</span>", "<span class='notice'>You unplug from the [A].</span>")
@@ -0,0 +1,246 @@
/mob/living/simple_animal/
var/happiness = 50 //how happy they are.
/////////////
//////////////// CHICKEN /////////////////
/////////////
/mob/living/simple_animal/chick
icon = 'hyperstation/icons/mob/chickens.dmi'
name = "\improper chick"
desc = "Adorable! They make such a racket though."
icon_state = "chick"
icon_living = "chick"
icon_dead = "chick_dead"
icon_gib = "chick_gib"
gender = FEMALE
mob_biotypes = MOB_ORGANIC|MOB_BEAST
speak = list("Cherp.","Cherp?","Chirrup.","Cheep!")
speak_emote = list("cheeps")
emote_hear = list("cheeps.")
emote_see = list("pecks at the ground.","flaps its tiny wings.")
density = FALSE
speak_chance = 2
turns_per_move = 2
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/chicken = 1)
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
attacktext = "kicks"
health = 3
maxHealth = 3
ventcrawler = VENTCRAWLER_ALWAYS
var/amount_grown = 0
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
mob_size = MOB_SIZE_TINY
gold_core_spawnable = FRIENDLY_SPAWN
do_footstep = TRUE
/mob/living/simple_animal/chick/Initialize()
. = ..()
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
/mob/living/simple_animal/chick/Life()
. =..()
if(!.)
return
if(!stat && !ckey)
amount_grown += rand(1,2)
if(amount_grown >= 100)
new /mob/living/simple_animal/chicken(src.loc)
qdel(src)
/mob/living/simple_animal/chick/holo/Life()
..()
amount_grown = 0
/mob/living/simple_animal/chicken
icon = 'hyperstation/icons/mob/chickens.dmi'
name = "\improper chicken"
desc = "Hopefully the eggs are good this season."
gender = FEMALE
mob_biotypes = MOB_ORGANIC|MOB_BEAST
icon_state = "chicken_brown"
icon_living = "chicken_brown"
icon_dead = "chicken_brown_dead"
speak = list("Cluck!","BWAAAAARK BWAK BWAK BWAK!","Bwaak bwak.")
speak_emote = list("clucks","croons")
emote_hear = list("clucks.")
emote_see = list("pecks at the ground.","flaps its wings viciously.")
density = FALSE
speak_chance = 2
turns_per_move = 3
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/chicken = 2)
var/egg_type = /obj/item/reagent_containers/food/snacks/egg
var/food_type = /obj/item/reagent_containers/food/snacks/grown/wheat
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
attacktext = "kicks"
health = 15
maxHealth = 15
ventcrawler = VENTCRAWLER_ALWAYS
var/eggsleft = 0
var/eggsFertile = FALSE
var/body_color
var/icon_prefix = "chicken"
pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_SIZE_SMALL
var/list/feedMessages = list("It clucks happily.","It clucks happily.")
var/list/layMessage = EGG_LAYING_MESSAGES
var/list/validColors = list("brown","black","white")
gold_core_spawnable = FRIENDLY_SPAWN
var/static/chicken_count = 0
var/partner //for the sex.
var/egglay_timer = 0
var/obj/structure/nestbox/nest_target
var/last_egg
var/force_gender //for map loading
do_footstep = TRUE
/mob/living/simple_animal/chicken/Initialize()
. = ..()
if((prob(30) && !force_gender) || force_gender == "male") //30% of a male. or setup if already male.
gender = MALE
name = "rooster"
if(!body_color)
body_color = pick(validColors)
icon_state = "[icon_prefix]_[body_color]"
icon_living = "[icon_prefix]_[body_color]"
icon_dead = "[icon_prefix]_[body_color]_dead"
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
++chicken_count
/mob/living/simple_animal/chicken/Destroy()
--chicken_count
return ..()
/mob/living/simple_animal/chicken/attackby(obj/item/O, mob/user, params)
if(istype(O, food_type)) //feedin' dem chickens
if(!stat && eggsleft < 2)
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
user.visible_message(feedmsg)
qdel(O)
eggsleft += 1
egglay_timer = 0
else
to_chat(user, "<span class='warning'>[name] doesn't seem hungry!</span>")
else
..()
/mob/living/simple_animal/chicken/Life()
. = ..()
if(!.)
return
if (istype(get_turf(src), /turf/open/floor))
var/turf/open/floor/turfon = get_turf(src)
if (turfon.farm_quality > happiness)
happiness ++
if (prob(5))
visible_message("[src] pecks happily at the ground.") //CLUCK CLUCK CLUCK
else
happiness --
else
happiness --
happiness = clamp(happiness,0,100) //clamp
if (!(gender == FEMALE)) //only females lay eggs and do the rest of the code.
return
//Breeding.
if (gender == FEMALE && eggsFertile == 0 && eggsleft > 0)
for(var/mob/living/simple_animal/chicken/C in view(2,src)) //look for a male near them, or on them.
if(C)
if(C.gender == MALE) //rooster
eggsFertile = 1 //they had sex, just go with it.
partner = C //you know who the partner is.
//EEGGGG TIME
//after 10mins, lay a egg regardless.
if(world.time > (last_egg+600 SECONDS) && !eggsleft)
if(prob(15)) //just to offset
eggsleft ++
last_egg = world.time
if((!stat && eggsleft > 0) && egg_type)
egglay_timer ++
else
egglay_timer = 0
//chance to lay egg on their own.
//look for nest!
//We have found a nest, override movement
if(nest_target) //if alive and we have a target.
stop_automated_movement = 1
walk_to(src,nest_target,0,8)
else
stop_automated_movement = 0
walk_to(src,0) //reset walk_to
if (egglay_timer > 10 && !stat) //time to lay a egg and not dead.
if((!stat && eggsleft > 0) && egg_type)
if (!nest_target)
for(var/obj/structure/nestbox/N in view(3,src)) // look for a eggbox if you dont have one already
nest_target = N
break
//We are at the nest we have chosen.
if (nest_target)
for(var/obj/structure/nestbox/B in get_turf(src))
if((prob(25) && eggsleft > 0) && egg_type)
visible_message("<span class='alertalien'>[src] [pick(layMessage)]</span>")
eggsleft--
var/obj/item/E = new egg_type(get_turf(src))
E.pixel_x = rand(-6,6)
E.pixel_y = rand(-6,6)
egglay_timer = 0 //set timer
nest_target = null //layed the egg, time to move on
if(eggsFertile && partner)
if(chicken_count < MAX_CHICKENS && prob(happiness))
START_PROCESSING(SSobj, E)
eggsFertile = 0 //youve layed your fertile egg.
E.name = "fertile egg"
partner = null
last_egg = world.time
break
/obj/item/reagent_containers/food/snacks/egg/var/amount_grown = 0
/obj/item/reagent_containers/food/snacks/egg/process()
if(isturf(loc))
for(var/obj/structure/nestbox/B in get_turf(src)) //can only hatch in a nestbox or incubator
amount_grown += rand(1,2)
if(amount_grown >= 100)
visible_message("[src] hatches with a quiet cracking sound.")
new /mob/living/simple_animal/chick(get_turf(src))
STOP_PROCESSING(SSobj, src)
qdel(src)
break
else
STOP_PROCESSING(SSobj, src)
/mob/living/simple_animal/chicken/examine()
. = ..()
. += "this one is [gender]."
if(happiness<20)
. += "<span class='warning'>It looks stressed.</span>"
@@ -27,3 +27,7 @@ mob/proc/checkloadappearance()
else
to_chat(H, "<span class='boldannounce'>You either took too long or chose not to change. Alrighty. Remember, you have 90 seconds from spawn to get to a mirror and still do it if you wish.</span>")
return
// oracle port
/mob/proc/has_mouth()
return FALSE