mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Merge branch 'never_enough_fish' into 'Bleeding-Edge'
Adds space carp pheromones Eh, probably shitty but here it goes. Probably needs a better name too * Created by mixing carpotoxin, leporazine and carbon. You have to have them in your system for them to have any effect * Carps won't mind you if you have carp pheromones in your system. If a carp is already angry at you, however, ingesting pheromones won't save your ass * If you have carp pheromones in your system, you constantly emit a horrible stench noticeable by other people without a mask on. Also removes an unused type of meat which doesn't work See merge request !118
This commit is contained in:
@@ -46,6 +46,11 @@
|
|||||||
/mob/living/simple_animal/hostile/scarybat/Process_Spacemove(var/check_drift = 0)
|
/mob/living/simple_animal/hostile/scarybat/Process_Spacemove(var/check_drift = 0)
|
||||||
return ..() //No drifting in space for space carp! //original comments do not steal
|
return ..() //No drifting in space for space carp! //original comments do not steal
|
||||||
|
|
||||||
|
/mob/living/simple_animal/hostile/scarybat/IsInvalidTarget(atom/A)
|
||||||
|
..()
|
||||||
|
if(A == owner)
|
||||||
|
return 1
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/scarybat/FindTarget()
|
/mob/living/simple_animal/hostile/scarybat/FindTarget()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
var/global/
|
#define PHEROMONES_NO_EFFECT 0
|
||||||
|
#define PHEROMONES_NEUTRAL 1
|
||||||
|
#define PHEROMONES_FOLLOW 2
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/carp
|
/mob/living/simple_animal/hostile/carp
|
||||||
name = "space carp"
|
name = "space carp"
|
||||||
@@ -42,6 +44,9 @@ var/global/
|
|||||||
|
|
||||||
faction = "carp"
|
faction = "carp"
|
||||||
|
|
||||||
|
var/pheromones_act = PHEROMONES_NEUTRAL //This variable determines how carps act to pheromones. Big carps won't attack the source,
|
||||||
|
//baby carps follow the source and holocarps don't give a shit
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/carp/New()
|
/mob/living/simple_animal/hostile/carp/New()
|
||||||
.=..()
|
.=..()
|
||||||
gender = pick(MALE, FEMALE)
|
gender = pick(MALE, FEMALE)
|
||||||
@@ -66,12 +71,24 @@ var/global/
|
|||||||
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0)
|
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0)
|
||||||
return 1 //No drifting in space for space carp! //original comments do not steal
|
return 1 //No drifting in space for space carp! //original comments do not steal
|
||||||
|
|
||||||
|
/mob/living/simple_animal/hostile/carp/IsInvalidTarget(atom/A)
|
||||||
|
if(ismob(A) && A.reagents)
|
||||||
|
if(pheromones_act == PHEROMONES_NEUTRAL && A.reagents.has_reagent("carppheromones"))
|
||||||
|
return 1 //Carps who avoid pheromones don't target mobs with pheromones in their system. They just ignore them!
|
||||||
|
..()
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/carp/FindTarget()
|
/mob/living/simple_animal/hostile/carp/FindTarget()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
emote("nashes at [.]")
|
emote("nashes at [.]")
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/carp/AttackingTarget()
|
/mob/living/simple_animal/hostile/carp/AttackingTarget()
|
||||||
|
if(!target) return
|
||||||
|
|
||||||
|
if(pheromones_act == PHEROMONES_FOLLOW && target.reagents && target.reagents.has_reagent("carppheromones"))
|
||||||
|
return //This might be a bit hacky. The purpose of this is to prevent carps who are attracted to pheromones from attacking
|
||||||
|
//the source. Instead, it simply follows it.
|
||||||
|
|
||||||
. =..()
|
. =..()
|
||||||
var/mob/living/carbon/L = .
|
var/mob/living/carbon/L = .
|
||||||
if(istype(L))
|
if(istype(L))
|
||||||
@@ -93,11 +110,18 @@ var/global/
|
|||||||
melee_damage_upper = 8
|
melee_damage_upper = 8
|
||||||
melee_damage_lower = 8
|
melee_damage_lower = 8
|
||||||
|
|
||||||
|
pheromones_act = PHEROMONES_FOLLOW
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/carp/holocarp
|
/mob/living/simple_animal/hostile/carp/holocarp
|
||||||
icon_state = "holocarp"
|
icon_state = "holocarp"
|
||||||
icon_living = "holocarp"
|
icon_living = "holocarp"
|
||||||
can_breed = 0
|
can_breed = 0
|
||||||
|
pheromones_act = PHEROMONES_NO_EFFECT
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/carp/holocarp/Die()
|
/mob/living/simple_animal/hostile/carp/holocarp/Die()
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
#undef PHEROMONES_NO_EFFECT
|
||||||
|
#undef PHEROMONES_NEUTRAL
|
||||||
|
#undef PHEROMONES_FOLLOW
|
||||||
|
|||||||
@@ -82,6 +82,10 @@
|
|||||||
L += Objects
|
L += Objects
|
||||||
return L
|
return L
|
||||||
|
|
||||||
|
/mob/living/simple_animal/hostile/proc/IsInvalidTarget(atom/A)
|
||||||
|
if(isMoMMI(A))
|
||||||
|
return 1
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/proc/FindTarget()//Step 2, filter down possible targets to things we actually care about
|
/mob/living/simple_animal/hostile/proc/FindTarget()//Step 2, filter down possible targets to things we actually care about
|
||||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/simple_animal/hostile/proc/FindTarget() called tick#: [world.time]")
|
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/simple_animal/hostile/proc/FindTarget() called tick#: [world.time]")
|
||||||
var/list/Targets = list()
|
var/list/Targets = list()
|
||||||
@@ -93,11 +97,8 @@
|
|||||||
Targets = FoundTarget
|
Targets = FoundTarget
|
||||||
break
|
break
|
||||||
if(CanAttack(A))//Can we attack it?
|
if(CanAttack(A))//Can we attack it?
|
||||||
if(isMoMMI(A))
|
if(IsInvalidTarget(A)) continue
|
||||||
continue
|
|
||||||
if(istype(src, /mob/living/simple_animal/hostile/scarybat))
|
|
||||||
if(A == src:owner)
|
|
||||||
continue
|
|
||||||
Targets += A
|
Targets += A
|
||||||
continue
|
continue
|
||||||
Target = PickTarget(Targets)
|
Target = PickTarget(Targets)
|
||||||
@@ -125,11 +126,11 @@
|
|||||||
return 0
|
return 0
|
||||||
if(isliving(the_target) && search_objects < 2)
|
if(isliving(the_target) && search_objects < 2)
|
||||||
var/mob/living/L = the_target
|
var/mob/living/L = the_target
|
||||||
if(L.stat > stat_attack || L.stat != stat_attack && stat_exclusive == 1)
|
if(L.stat > stat_attack || (L.stat != stat_attack && stat_exclusive == 1))
|
||||||
return 0
|
return 0
|
||||||
if(L.flags & INVULNERABLE)
|
if(L.flags & INVULNERABLE)
|
||||||
return 0
|
return 0
|
||||||
if(L.faction == src.faction && !attack_same || L.faction != src.faction && attack_same == 2 || L.faction != attack_faction && attack_faction)
|
if((L.faction == src.faction && !attack_same) || (L.faction != src.faction && attack_same == 2) || (L.faction != attack_faction && attack_faction))
|
||||||
return 0
|
return 0
|
||||||
if(iscultist(L) && (faction == "cult"))
|
if(iscultist(L) && (faction == "cult"))
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -2762,6 +2762,34 @@
|
|||||||
H.update_mutations() //update our mutation overlays
|
H.update_mutations() //update our mutation overlays
|
||||||
H.update_body()
|
H.update_body()
|
||||||
|
|
||||||
|
/datum/reagent/carp_pheromones
|
||||||
|
name = "carp pheromones"
|
||||||
|
id = "carppheromones"
|
||||||
|
description = "A disgusting liquid with a horrible smell, which is used by space carps to mark their territory and food."
|
||||||
|
reagent_state = LIQUID
|
||||||
|
color = "#6AAA96" // rgb: 106, 170, 150
|
||||||
|
custom_metabolism = 0.1
|
||||||
|
|
||||||
|
/datum/reagent/carp_pheromones/on_mob_life(var/mob/living/M as mob)
|
||||||
|
if(!holder) return
|
||||||
|
if(!M) M = holder.my_atom
|
||||||
|
if(!data) data = 0
|
||||||
|
data++
|
||||||
|
|
||||||
|
var/stench_radius = Clamp(data * 0.1, 1, 6) //Stench starts out with 1 tile radius and grows after every 10 life ticks
|
||||||
|
|
||||||
|
if(prob(5)) // 5% chance of stinking per life()
|
||||||
|
for(var/mob/living/carbon/C in oview(stench_radius,M)) //All other carbons in 4 tile radius (excluding our mob)
|
||||||
|
if(C.stat) return
|
||||||
|
if(istype(C.wear_mask))
|
||||||
|
var/obj/item/clothing/mask/c_mask = C.wear_mask
|
||||||
|
if(c_mask.body_parts_covered & MOUTH) continue //If the carbon's mouth is covered, let's assume they don't smell it
|
||||||
|
|
||||||
|
C << "<span class='warning'>You are engulfed by a [pick("tremendous","foul","disgusting","horrible")] stench emanating from [M]!</span>"
|
||||||
|
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
/datum/reagent/blackpepper
|
/datum/reagent/blackpepper
|
||||||
name = "Black Pepper"
|
name = "Black Pepper"
|
||||||
id = "blackpepper"
|
id = "blackpepper"
|
||||||
|
|||||||
@@ -563,6 +563,13 @@ datum
|
|||||||
required_reagents = list("sodiumchloride" = 1, "ethanol" = 1, "radium" = 1)
|
required_reagents = list("sodiumchloride" = 1, "ethanol" = 1, "radium" = 1)
|
||||||
result_amount = 3
|
result_amount = 3
|
||||||
|
|
||||||
|
carp_pheromones
|
||||||
|
name = "Carp pheromones"
|
||||||
|
id = "carppheromones"
|
||||||
|
result = "carppheromones"
|
||||||
|
required_reagents = list("carpotoxin" = 1, "leporazine" = 1, "carbon" = 1)
|
||||||
|
result_amount = 3
|
||||||
|
|
||||||
plasmasolidification
|
plasmasolidification
|
||||||
name = "Solid Plasma"
|
name = "Solid Plasma"
|
||||||
id = "solidplasma"
|
id = "solidplasma"
|
||||||
|
|||||||
@@ -81,14 +81,6 @@
|
|||||||
reagents.add_reagent("hyperzine", 5)
|
reagents.add_reagent("hyperzine", 5)
|
||||||
src.bitesize = 3
|
src.bitesize = 3
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/meat/mimic
|
|
||||||
name = "meat"
|
|
||||||
desc = "An ordinary slab of meat. Or is it?"
|
|
||||||
icon_state = "meat"
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
reagents.add_reagent("mimicinum", 3)
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/meat/egg
|
/obj/item/weapon/reagent_containers/food/snacks/meat/egg
|
||||||
name = "egg"
|
name = "egg"
|
||||||
desc = "An egg!"
|
desc = "An egg!"
|
||||||
|
|||||||
7
html/changelogs/unid_carp.yml
Normal file
7
html/changelogs/unid_carp.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
author: Unid
|
||||||
|
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- rscadd: Added carp pheromones, created by mixing carpotoxin, leporazine and carbon.
|
||||||
|
- rscadd: Adult space carps ignore mobs with carp pheromones, baby space carp follow them instead (without attacking).
|
||||||
Reference in New Issue
Block a user