[reviewpls] Adds moodlets to the game - [Please give suggestions for trait additions in comments]
This commit is contained in:
committed by
CitadelStationBot
parent
4d0b7133c8
commit
a96a28f3d6
@@ -13,7 +13,8 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
var/replace_banned = TRUE //Should replace jobbaned player with ghosts if granted.
|
||||
var/list/objectives = list()
|
||||
var/antag_memory = ""//These will be removed with antag datum
|
||||
|
||||
var/antag_moodlet //typepath of moodlet that the mob will gain with their status
|
||||
|
||||
//Antag panel properties
|
||||
var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
|
||||
var/antagpanel_category = "Uncategorized" //Antagpanel will display these together, REQUIRED
|
||||
@@ -67,6 +68,7 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
if(!silent)
|
||||
greet()
|
||||
apply_innate_effects()
|
||||
give_antag_moodies()
|
||||
if(is_banned(owner.current) && replace_banned)
|
||||
replace_banned_player()
|
||||
|
||||
@@ -88,6 +90,7 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
/datum/antagonist/proc/on_removal()
|
||||
remove_innate_effects()
|
||||
clear_antag_moodies()
|
||||
if(owner)
|
||||
LAZYREMOVE(owner.antag_datums, src)
|
||||
if(!silent && owner.current)
|
||||
@@ -103,6 +106,20 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
/datum/antagonist/proc/farewell()
|
||||
return
|
||||
|
||||
/datum/antagonist/proc/give_antag_moodies()
|
||||
if(!antag_moodlet)
|
||||
return
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, owner.current)
|
||||
if(mood)
|
||||
mood.add_event("antag_moodlet", antag_moodlet)
|
||||
|
||||
/datum/antagonist/proc/clear_antag_moodies()
|
||||
if(!antag_moodlet)
|
||||
return
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, owner.current)
|
||||
if(mood)
|
||||
mood.add_event("antag_moodlet")
|
||||
|
||||
//Returns the team antagonist belongs to if any.
|
||||
/datum/antagonist/proc/get_team()
|
||||
return
|
||||
@@ -183,7 +200,7 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
edit_memory(usr)
|
||||
owner.traitor_panel()
|
||||
return
|
||||
|
||||
|
||||
//Some commands might delete/modify this datum clearing or changing owner
|
||||
var/datum/mind/persistent_owner = owner
|
||||
|
||||
@@ -231,4 +248,4 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
name = custom_name
|
||||
else
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
job_rank = ROLE_BROTHER
|
||||
var/special_role = ROLE_BROTHER
|
||||
var/datum/team/brother_team/team
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
|
||||
/datum/antagonist/brother/create_team(datum/team/brother_team/new_team)
|
||||
if(!new_team)
|
||||
@@ -151,4 +152,4 @@
|
||||
add_objective(new/datum/objective/steal, TRUE)
|
||||
|
||||
/datum/team/brother_team/antag_listing_name()
|
||||
return "[name] blood brothers"
|
||||
return "[name] blood brothers"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
roundend_category = "changelings"
|
||||
antagpanel_category = "Changeling"
|
||||
job_rank = ROLE_CHANGELING
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
|
||||
var/you_are_greet = TRUE
|
||||
var/give_objectives = TRUE
|
||||
@@ -542,4 +543,4 @@
|
||||
return ..() + "([changelingID])"
|
||||
|
||||
/datum/antagonist/changeling/xenobio/antag_listing_name()
|
||||
return ..() + "(Xenobio)"
|
||||
return ..() + "(Xenobio)"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
roundend_category = "clock cultists"
|
||||
antagpanel_category = "Clockcult"
|
||||
job_rank = ROLE_SERVANT_OF_RATVAR
|
||||
antag_moodlet = /datum/mood_event/cult
|
||||
var/datum/action/innate/hierophant/hierophant_network = new()
|
||||
var/datum/team/clockcult/clock_team
|
||||
var/make_team = TRUE //This should be only false for tutorial scarabs
|
||||
@@ -216,4 +217,4 @@
|
||||
parts += "<span class='header'>Ratvar's servants were:</span>"
|
||||
parts += printplayerlist(members - eminence)
|
||||
|
||||
return "<div class='panel clockborder'>[parts.Join("<br>")]</div>"
|
||||
return "<div class='panel clockborder'>[parts.Join("<br>")]</div>"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "Cultist"
|
||||
roundend_category = "cultists"
|
||||
antagpanel_category = "Cult"
|
||||
antag_moodlet = /datum/mood_event/cult
|
||||
var/datum/action/innate/cult/comm/communion = new
|
||||
var/datum/action/innate/cult/mastervote/vote = new
|
||||
var/datum/action/innate/cult/blood_magic/magic = new
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/role = ERT_SEC
|
||||
var/high_alert = FALSE
|
||||
show_in_antagpanel = FALSE
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
|
||||
/datum/antagonist/ert/on_gain()
|
||||
update_name()
|
||||
@@ -71,11 +72,11 @@
|
||||
/datum/antagonist/ert/greet()
|
||||
if(!ert_team)
|
||||
return
|
||||
|
||||
|
||||
var/leader = role == ERT_LEADER || role == DEATHSQUAD_LEADER
|
||||
|
||||
|
||||
to_chat(owner, "<B><font size=3 color=red>You are the [name].</font></B>")
|
||||
|
||||
|
||||
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
|
||||
if(leader) //If Squad Leader
|
||||
missiondesc += " Lead your squad to ensure the completion of the mission. Board the shuttle when your team is ready."
|
||||
@@ -83,6 +84,6 @@
|
||||
missiondesc += " Follow orders given to you by your squad leader."
|
||||
if(role != DEATHSQUAD && role != DEATHSQUAD_LEADER)
|
||||
missiondesc += "Avoid civilian casualites when possible."
|
||||
|
||||
|
||||
missiondesc += "<BR><B>Your Mission</B> : [ert_team.mission.explanation_text]"
|
||||
to_chat(owner,missiondesc)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
antagpanel_category = "Ninja"
|
||||
job_rank = ROLE_NINJA
|
||||
show_name_in_check_antagonists = TRUE
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
var/helping_station = FALSE
|
||||
var/give_objectives = TRUE
|
||||
var/give_equipment = TRUE
|
||||
@@ -149,4 +150,4 @@
|
||||
/datum/antagonist/ninja/proc/update_ninja_icons_removed(var/mob/living/carbon/human/ninja)
|
||||
var/datum/atom_hud/antag/ninjahud = GLOB.huds[ANTAG_HUD_NINJA]
|
||||
ninjahud.leave_hud(ninja)
|
||||
set_antag_hud(ninja, null)
|
||||
set_antag_hud(ninja, null)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
roundend_category = "syndicate operatives" //just in case
|
||||
antagpanel_category = "NukeOp"
|
||||
job_rank = ROLE_OPERATIVE
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
var/datum/team/nuclear/nuke_team
|
||||
var/always_new_team = FALSE //If not assigned a team by default ops will try to join existing ones, set this to TRUE to always create new team.
|
||||
var/send_to_spawnpoint = TRUE //Should the user be moved to default spawnpoint.
|
||||
@@ -136,7 +137,7 @@
|
||||
to_chat(owner.current, "The nuclear authorization code is: <B>[code]</B>")
|
||||
else
|
||||
to_chat(admin, "<span class='danger'>No valid nuke found!</span>")
|
||||
|
||||
|
||||
/datum/antagonist/nukeop/leader
|
||||
name = "Nuclear Operative Leader"
|
||||
nukeop_outfit = /datum/outfit/syndicate/leader
|
||||
@@ -366,4 +367,4 @@
|
||||
return common_part + disk_report
|
||||
|
||||
/datum/team/nuclear/is_gamemode_hero()
|
||||
return SSticker.mode.name == "nuclear emergency"
|
||||
return SSticker.mode.name == "nuclear emergency"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
roundend_category = "revolutionaries" // if by some miracle revolutionaries without revolution happen
|
||||
antagpanel_category = "Revolution"
|
||||
job_rank = ROLE_REV
|
||||
antag_moodlet = /datum/mood_event/revolution
|
||||
var/hud_type = "rev"
|
||||
var/datum/team/revolution/rev_team
|
||||
|
||||
@@ -365,4 +366,4 @@
|
||||
return common_part + heads_report
|
||||
|
||||
/datum/team/revolution/is_gamemode_hero()
|
||||
return SSticker.mode.name == "revolution"
|
||||
return SSticker.mode.name == "revolution"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
roundend_category = "traitors"
|
||||
antagpanel_category = "Traitor"
|
||||
job_rank = ROLE_TRAITOR
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
var/should_specialise = TRUE //do we split into AI and human, set to true on inital assignment only
|
||||
var/ai_datum = /datum/antagonist/traitor/AI
|
||||
var/human_datum = /datum/antagonist/traitor/human
|
||||
@@ -11,7 +12,7 @@
|
||||
var/give_objectives = TRUE
|
||||
var/should_give_codewords = TRUE
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/antagonist/traitor/human
|
||||
show_in_antagpanel = FALSE
|
||||
@@ -343,7 +344,7 @@
|
||||
var/static/icon/badass = icon('icons/badass.dmi', "badass")
|
||||
uplink_text += "<BIG>[icon2html(badass, world)]</BIG>"
|
||||
result += uplink_text
|
||||
|
||||
|
||||
result += objectives_text
|
||||
|
||||
var/special_role_text = lowertext(name)
|
||||
@@ -361,4 +362,4 @@
|
||||
<b>The code responses were:</b> <span class='codephrase'>[GLOB.syndicate_code_response]</span><br>"
|
||||
|
||||
/datum/antagonist/traitor/is_gamemode_hero()
|
||||
return SSticker.mode.name == "traitor"
|
||||
return SSticker.mode.name == "traitor"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
roundend_category = "wizards/witches"
|
||||
antagpanel_category = "Wizard"
|
||||
job_rank = ROLE_WIZARD
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
var/give_objectives = TRUE
|
||||
var/strip = TRUE //strip before equipping
|
||||
var/allow_rename = TRUE
|
||||
@@ -331,4 +332,4 @@
|
||||
parts += "<span class='header'>[master_wizard.owner.name] apprentices were:</span>"
|
||||
parts += printplayerlist(members - master_wizard.owner)
|
||||
|
||||
return "<div class='panel redborder'>[parts.Join("<br>")]</div>"
|
||||
return "<div class='panel redborder'>[parts.Join("<br>")]</div>"
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
if(damagetype & SHAME)
|
||||
adjustStaminaLoss(200)
|
||||
suiciding = FALSE
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.add_event("shameful_suicide", /datum/mood_event/shameful_suicide)
|
||||
return
|
||||
var/damage_mod = 0
|
||||
for(var/T in list(BRUTELOSS, FIRELOSS, TOXLOSS, OXYLOSS))
|
||||
|
||||
@@ -81,6 +81,20 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg'=1,'sound/effects/clownstep2.ogg'=1), 50)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(user.mind && user.mind.assigned_role == "Clown")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
|
||||
if(mood)
|
||||
mood.clear_event("noshoes")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/dropped(mob/user)
|
||||
. = ..()
|
||||
if(user.mind && user.mind.assigned_role == "Clown")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
|
||||
if(mood)
|
||||
mood.add_event("noshoes", /datum/mood_event/noshoes)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/jester
|
||||
name = "jester shoes"
|
||||
desc = "A court jesters shoes, updated with modern squeaking technology."
|
||||
|
||||
@@ -75,4 +75,4 @@
|
||||
rebel.shoot_inventory = 1
|
||||
|
||||
if(ISMULTIPLE(activeFor, 8))
|
||||
originMachine.speak(pick(rampant_speeches))
|
||||
originMachine.speak(pick(rampant_speeches))
|
||||
|
||||
@@ -23,12 +23,21 @@
|
||||
if(foodtype & H.dna.species.toxic_food)
|
||||
to_chat(H,"<span class='warning'>What the hell was that thing?!</span>")
|
||||
H.adjust_disgust(25 + 30 * fraction)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood)
|
||||
mood.add_event("toxic_food", /datum/mood_event/disgusting_food)
|
||||
else if(foodtype & H.dna.species.disliked_food)
|
||||
to_chat(H,"<span class='notice'>That didn't taste very good...</span>")
|
||||
H.adjust_disgust(11 + 15 * fraction)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood)
|
||||
mood.add_event("gross_food", /datum/mood_event/gross_food)
|
||||
else if(foodtype & H.dna.species.liked_food)
|
||||
to_chat(H,"<span class='notice'>I love this taste!</span>")
|
||||
H.adjust_disgust(-5 + -2.5 * fraction)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood)
|
||||
mood.add_event("fav_food", /datum/mood_event/favorite_food)
|
||||
else
|
||||
if(foodtype & H.dna.species.toxic_food)
|
||||
to_chat(H, "<span class='warning'>You don't feel so good...</span>")
|
||||
|
||||
@@ -459,4 +459,4 @@
|
||||
. = O.attack(M, user, def_zone, FALSE)
|
||||
update_icon()
|
||||
|
||||
#undef PANCAKE_MAX_STACK
|
||||
#undef PANCAKE_MAX_STACK
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
if(!H.creamed) // one layer at a time
|
||||
H.add_overlay(creamoverlay)
|
||||
H.creamed = TRUE
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood)
|
||||
mood.add_event("creampie", /datum/mood_event/creampie)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/pie/cream/nostun
|
||||
@@ -244,4 +247,4 @@
|
||||
icon_state = "frostypie"
|
||||
bonus_reagents = list("nutriment" = 4, "vitamin" = 6)
|
||||
tastes = list("mint" = 1, "pie" = 1)
|
||||
foodtype = GRAIN | FRUIT | SUGAR
|
||||
foodtype = GRAIN | FRUIT | SUGAR
|
||||
|
||||
@@ -316,6 +316,7 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.unconscious {color: #0000ff; font-weight: bold;}
|
||||
.suicide {color: #ff5050; font-style: italic;}
|
||||
.green {color: #03ff39;}
|
||||
.nicegreen {color: #14a833;}
|
||||
.shadowling {color: #3b2769;}
|
||||
.cult {color: #960000;}
|
||||
|
||||
|
||||
@@ -206,6 +206,9 @@
|
||||
if(dat)
|
||||
user << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book[window_size != null ? ";size=[window_size]" : ""]")
|
||||
user.visible_message("[user] opens a book titled \"[title]\" and begins reading intently.")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
|
||||
if(mood)
|
||||
mood.add_event("book_nerd", /datum/mood_event/book_nerd)
|
||||
onclose(user, "book")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>This book is completely blank!</span>")
|
||||
|
||||
@@ -738,12 +738,17 @@
|
||||
|
||||
//called when we get cuffed/uncuffed
|
||||
/mob/living/carbon/proc/update_handcuffed()
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(handcuffed)
|
||||
drop_all_held_items()
|
||||
stop_pulling()
|
||||
throw_alert("handcuffed", /obj/screen/alert/restrained/handcuffed, new_master = src.handcuffed)
|
||||
if(mood)
|
||||
mood.add_event("handcuffed", /datum/mood_event/handcuffed)
|
||||
else
|
||||
clear_alert("handcuffed")
|
||||
if(mood)
|
||||
mood.clear_event("handcuffed")
|
||||
update_action_buttons_icon() //some of our action buttons might be unusable when we're handcuffed.
|
||||
update_inv_handcuffed()
|
||||
update_hud_handcuffed()
|
||||
|
||||
@@ -266,6 +266,9 @@
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [p_them()] feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make [p_them()] feel better!</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.add_event("hug", /datum/mood_event/hug)
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustUnconscious(-60)
|
||||
|
||||
@@ -89,7 +89,21 @@
|
||||
if(digitalcamo)
|
||||
msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner.\n"
|
||||
|
||||
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
switch(mood.shown_mood)
|
||||
if(-INFINITY to MOOD_LEVEL_SAD4)
|
||||
msg += "[t_He] look[p_s()] depressed.\n"
|
||||
if(MOOD_LEVEL_SAD4 to MOOD_LEVEL_SAD3)
|
||||
msg += "[t_He] look[p_s()] very sad.\n"
|
||||
if(MOOD_LEVEL_SAD3 to MOOD_LEVEL_SAD2)
|
||||
msg += "[t_He] look[p_s()] a bit down.\n"
|
||||
if(MOOD_LEVEL_HAPPY2 to MOOD_LEVEL_HAPPY3)
|
||||
msg += "[t_He] look[p_s()] quite happy.\n"
|
||||
if(MOOD_LEVEL_HAPPY3 to MOOD_LEVEL_HAPPY4)
|
||||
msg += "[t_He] look[p_s()] very happy.\n"
|
||||
if(MOOD_LEVEL_HAPPY4 to INFINITY)
|
||||
msg += "[t_He] look[p_s()] ecstatic.\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
|
||||
@@ -30,11 +30,17 @@
|
||||
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT), CALLBACK(src, .proc/clean_blood))
|
||||
|
||||
|
||||
/mob/living/carbon/human/ComponentInitialize()
|
||||
if(!CONFIG_GET(flag/disable_human_mood))
|
||||
AddComponent(/datum/component/mood)
|
||||
|
||||
/mob/living/carbon/human/Destroy()
|
||||
QDEL_NULL(physiology)
|
||||
QDEL_NULL_LIST(vore_organs) // CITADEL EDIT belly stuff
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/human/OpenCraftingMenu()
|
||||
handcrafting.ui_interact(src)
|
||||
|
||||
@@ -223,6 +229,9 @@
|
||||
usr.visible_message("[usr] successfully rips [I] out of their [L.name]!","<span class='notice'>You successfully remove [I] from your [L.name].</span>")
|
||||
if(!has_embedded_objects())
|
||||
clear_alert("embeddedobject")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, usr)
|
||||
if(mood)
|
||||
mood.clear_event("embeddedobject")
|
||||
return
|
||||
|
||||
if(href_list["item"])
|
||||
@@ -651,6 +660,9 @@
|
||||
return
|
||||
|
||||
src.visible_message("[src] performs CPR on [C.name]!", "<span class='notice'>You perform CPR on [C.name].</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.add_event("perform_cpr", /datum/mood_event/perform_cpr)
|
||||
C.cpr_time = world.time
|
||||
add_logs(src, C, "CPRed")
|
||||
|
||||
|
||||
@@ -144,6 +144,9 @@
|
||||
I.forceMove(src)
|
||||
L.receive_damage(I.w_class*I.embedding.embedded_impact_pain_multiplier)
|
||||
visible_message("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.add_event("embedded", /datum/mood_event/embedded)
|
||||
hitpush = FALSE
|
||||
skipcatch = TRUE //can't catch the now embedded item
|
||||
|
||||
|
||||
@@ -85,6 +85,19 @@
|
||||
to_chat(src, "<span class='notice'>You don't feel like harming anybody.</span>")
|
||||
a_intent_change(INTENT_HELP)
|
||||
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if (getBrainLoss() >= 60 && stat == CONSCIOUS)
|
||||
if(mood)
|
||||
mood.add_event("brain_damage", /datum/mood_event/brain_damage)
|
||||
if(prob(3))
|
||||
if(prob(25))
|
||||
emote("drool")
|
||||
else
|
||||
say(pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage"))
|
||||
else
|
||||
if(mood)
|
||||
mood.clear_event("brain_damage")
|
||||
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation()
|
||||
if(!dna || !dna.species.handle_mutations_and_radiation(src))
|
||||
..()
|
||||
@@ -330,6 +343,9 @@
|
||||
visible_message("<span class='danger'>[I] falls out of [name]'s [BP.name]!</span>","<span class='userdanger'>[I] falls out of your [BP.name]!</span>")
|
||||
if(!has_embedded_objects())
|
||||
clear_alert("embeddedobject")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.clear_event("embedded")
|
||||
|
||||
/mob/living/carbon/human/proc/handle_active_genes()
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
|
||||
@@ -1121,6 +1121,16 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if (H.nutrition > 0 && H.stat != DEAD && !H.has_trait(TRAIT_NOHUNGER))
|
||||
// THEY HUNGER
|
||||
var/hunger_rate = HUNGER_FACTOR
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood)
|
||||
switch(mood.mood) //Alerts do_after delay based on how happy you are
|
||||
if(MOOD_LEVEL_HAPPY2 to MOOD_LEVEL_HAPPY3)
|
||||
hunger_rate *= 0.9
|
||||
if(MOOD_LEVEL_HAPPY3 to MOOD_LEVEL_HAPPY4)
|
||||
hunger_rate *= 0.8
|
||||
if(MOOD_LEVEL_HAPPY4 to INFINITY)
|
||||
hunger_rate *= 0.7
|
||||
|
||||
if(H.satiety > 0)
|
||||
H.satiety--
|
||||
if(H.satiety < 0)
|
||||
@@ -1154,14 +1164,31 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
to_chat(H, "<span class='notice'>You no longer feel vigorous.</span>")
|
||||
H.metabolism_efficiency = 1
|
||||
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
if(mood)
|
||||
mood.add_event("nutrition", /datum/mood_event/nutrition/fat)
|
||||
H.throw_alert("nutrition", /obj/screen/alert/fat)
|
||||
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FULL)
|
||||
if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
|
||||
if(mood)
|
||||
mood.add_event("nutrition", /datum/mood_event/nutrition/wellfed)
|
||||
H.clear_alert("nutrition")
|
||||
if( NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
|
||||
if(mood)
|
||||
mood.add_event("nutrition", /datum/mood_event/nutrition/fed)
|
||||
H.clear_alert("nutrition")
|
||||
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
|
||||
if(mood)
|
||||
mood.clear_event("nutrition")
|
||||
H.clear_alert("nutrition")
|
||||
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
|
||||
if(mood)
|
||||
mood.add_event("nutrition", /datum/mood_event/nutrition/hungry)
|
||||
H.throw_alert("nutrition", /obj/screen/alert/hungry)
|
||||
else
|
||||
if(0 to NUTRITION_LEVEL_STARVING)
|
||||
if(mood)
|
||||
mood.add_event("nutrition", /datum/mood_event/nutrition/starving)
|
||||
H.throw_alert("nutrition", /obj/screen/alert/starving)
|
||||
|
||||
/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
|
||||
@@ -1262,14 +1289,22 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(I.flags_2 & SLOWS_WHILE_IN_HAND_2)
|
||||
. += I.slowdown
|
||||
var/health_deficiency = (100 - H.health + H.staminaloss)
|
||||
var/hungry = (500 - H.nutrition) / 5 // So overeat would be 100 and default level would be 80
|
||||
if(health_deficiency >= 40)
|
||||
if(flight)
|
||||
. += (health_deficiency / 75)
|
||||
else
|
||||
. += (health_deficiency / 25)
|
||||
if((hungry >= 70) && !flight) //Being hungry won't stop you from using flightpack controls/flapping your wings although it probably will in the wing case but who cares.
|
||||
. += hungry / 50
|
||||
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood && !flight) //How can depression slow you down if you can just fly away from your problems?
|
||||
switch(mood.mood)
|
||||
if(-INFINITY to MOOD_LEVEL_SAD4)
|
||||
. += 1.5
|
||||
if(MOOD_LEVEL_SAD4 to MOOD_LEVEL_SAD3)
|
||||
. += 1
|
||||
if(MOOD_LEVEL_SAD3 to MOOD_LEVEL_SAD2)
|
||||
. += 0.5
|
||||
|
||||
if(H.has_trait(TRAIT_FAT))
|
||||
. += (1.5 - flight)
|
||||
if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
@@ -1621,6 +1656,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(H.has_trait(TRAIT_NOBREATH))
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/species/proc/handle_environment(datum/gas_mixture/environment, mob/living/carbon/human/H)
|
||||
if(!environment)
|
||||
return
|
||||
@@ -1650,9 +1686,13 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
H.adjust_bodytemperature(natural*(1/(thermal_protection+1)) + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
|
||||
|
||||
// +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt.
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !H.has_trait(TRAIT_RESISTHEAT))
|
||||
//Body temperature is too hot.
|
||||
var/burn_damage
|
||||
if(mood)
|
||||
mood.clear_event("cold")
|
||||
mood.add_event("hot", /datum/mood_event/hot)
|
||||
switch(H.bodytemperature)
|
||||
if(BODYTEMP_HEAT_DAMAGE_LIMIT to 400)
|
||||
H.throw_alert("temp", /obj/screen/alert/hot, 1)
|
||||
@@ -1670,7 +1710,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if (H.stat < UNCONSCIOUS && (prob(burn_damage) * 10) / 4) //40% for level 3 damage on humans
|
||||
H.emote("scream")
|
||||
H.apply_damage(burn_damage, BURN)
|
||||
|
||||
else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !(GLOB.mutations_list[COLDRES] in H.dna.mutations))
|
||||
if(mood)
|
||||
mood.clear_event("hot")
|
||||
mood.add_event("cold", /datum/mood_event/cold)
|
||||
switch(H.bodytemperature)
|
||||
if(200 to BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
H.throw_alert("temp", /obj/screen/alert/cold, 1)
|
||||
@@ -1684,6 +1728,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
else
|
||||
H.clear_alert("temp")
|
||||
if(mood)
|
||||
mood.clear_event("cold")
|
||||
mood.clear_event("hot")
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = H.calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
|
||||
@@ -1778,6 +1825,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
else
|
||||
H.adjust_bodytemperature(BODYTEMP_HEATING_MAX + (H.fire_stacks * 12))
|
||||
|
||||
|
||||
/datum/species/proc/CanIgniteMob(mob/living/carbon/human/H)
|
||||
if(H.has_trait(TRAIT_NOFIRE))
|
||||
return FALSE
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
|
||||
|
||||
//OXYGEN
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
|
||||
if(prob(20))
|
||||
emote("gasp")
|
||||
@@ -156,6 +157,8 @@
|
||||
adjustOxyLoss(3)
|
||||
failed_last_breath = 1
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
if(mood)
|
||||
mood.add_event("suffocation", /datum/mood_event/suffocation)
|
||||
|
||||
else //Enough oxygen
|
||||
failed_last_breath = 0
|
||||
@@ -163,6 +166,8 @@
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]
|
||||
clear_alert("not_enough_oxy")
|
||||
if(mood)
|
||||
mood.clear_event("suffocation")
|
||||
|
||||
breath_gases[/datum/gas/oxygen][MOLES] -= oxygen_used
|
||||
breath_gases[/datum/gas/carbon_dioxide][MOLES] += oxygen_used
|
||||
|
||||
@@ -42,12 +42,17 @@
|
||||
|
||||
/mob/living/carbon/adjust_drugginess(amount)
|
||||
druggy = max(druggy+amount, 0)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
if(mood)
|
||||
mood.add_event("high", /datum/mood_event/drugs/high)
|
||||
else
|
||||
clear_fullscreen("high")
|
||||
clear_alert("high")
|
||||
if(mood)
|
||||
mood.clear_event("high")
|
||||
|
||||
/mob/living/carbon/set_drugginess(amount)
|
||||
druggy = max(amount, 0)
|
||||
@@ -97,4 +102,3 @@
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
. = B.cure_all_traumas(resilience)
|
||||
|
||||
|
||||
@@ -952,6 +952,9 @@
|
||||
"<span class='userdanger'>You're set on fire!</span>")
|
||||
new/obj/effect/dummy/fire(src)
|
||||
throw_alert("fire", /obj/screen/alert/fire)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.add_event("on_fire", /datum/mood_event/on_fire)
|
||||
update_fire()
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -963,6 +966,9 @@
|
||||
for(var/obj/effect/dummy/fire/F in src)
|
||||
qdel(F)
|
||||
clear_alert("fire")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.clear_event("on_fire")
|
||||
update_fire()
|
||||
|
||||
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
|
||||
|
||||
@@ -58,3 +58,4 @@
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
beauty = -300
|
||||
|
||||
@@ -231,6 +231,9 @@
|
||||
return
|
||||
if(!item_to_add)
|
||||
user.visible_message("[user] pets [src].","<span class='notice'>You rest your hand on [src]'s head for a moment.</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
|
||||
if(mood)
|
||||
mood.add_event("pet_corgi", /datum/mood_event/pet_corgi)
|
||||
return
|
||||
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(item_to_add))
|
||||
@@ -613,6 +616,9 @@
|
||||
if(M && stat != DEAD) // Added check to see if this mob (the dog) is dead to fix issue 2454
|
||||
new /obj/effect/temp_visual/heart(loc)
|
||||
emote("me", 1, "yaps happily!")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("pet_corgi", /datum/mood_event/pet_corgi)
|
||||
else
|
||||
if(M && stat != DEAD) // Same check here, even though emote checks it as well (poor form to check it only in the help case)
|
||||
emote("me", 1, "growls!")
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
desc = "A small pool of sludge, containing trace amounts of leaper venom."
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
icon_state = "tomato_floor1"
|
||||
beauty = -200
|
||||
|
||||
/obj/structure/leaper_bubble
|
||||
name = "leaper bubble"
|
||||
|
||||
@@ -233,6 +233,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
|
||||
if(M.z == z)
|
||||
SEND_SOUND(M, 'sound/magic/charge.ogg')
|
||||
to_chat(M, "<span class='boldannounce'>You feel reality distort for a moment...</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("delam", /datum/mood_event/delam)
|
||||
if(combined_gas > MOLE_PENALTY_THRESHOLD)
|
||||
investigate_log("has collapsed into a singularity.", INVESTIGATE_SUPERMATTER)
|
||||
if(T)
|
||||
|
||||
203
code/modules/projectiles/projectile/energy.dm
Normal file
203
code/modules/projectiles/projectile/energy.dm
Normal file
@@ -0,0 +1,203 @@
|
||||
/obj/item/projectile/energy
|
||||
name = "energy"
|
||||
icon_state = "spark"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "energy"
|
||||
is_reflectable = TRUE
|
||||
|
||||
/obj/item/projectile/energy/chameleon
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/energy/electrode
|
||||
name = "electrode"
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
nodamage = 1
|
||||
knockdown = 100
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 7
|
||||
tracer_type = /obj/effect/projectile/tracer/stun
|
||||
muzzle_type = /obj/effect/projectile/muzzle/stun
|
||||
impact_type = /obj/effect/projectile/impact/stun
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - burst into sparks!
|
||||
do_sparks(1, TRUE, src)
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
else if((C.status_flags & CANKNOCKDOWN) && !C.has_trait(TRAIT_STUNIMMUNE))
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/net
|
||||
name = "energy netting"
|
||||
icon_state = "e_netting"
|
||||
damage = 10
|
||||
damage_type = STAMINA
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/net/Initialize()
|
||||
. = ..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/energy/net/on_hit(atom/target, blocked = FALSE)
|
||||
if(isliving(target))
|
||||
var/turf/Tloc = get_turf(target)
|
||||
if(!locate(/obj/effect/nettingportal) in Tloc)
|
||||
new /obj/effect/nettingportal(Tloc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/net/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/effect/nettingportal
|
||||
name = "DRAGnet teleportation field"
|
||||
desc = "A field of bluespace energy, locking on to teleport a target."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dragnetfield"
|
||||
light_range = 3
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/nettingportal/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/device/radio/beacon/teletarget = null
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
teletarget = com.target
|
||||
|
||||
addtimer(CALLBACK(src, .proc/pop, teletarget), 30)
|
||||
|
||||
/obj/effect/nettingportal/proc/pop(teletarget)
|
||||
if(teletarget)
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, teletarget, 2)//teleport what's in the tile to the beacon
|
||||
else
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, L, 15) //Otherwise it just warps you off somewhere.
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/nettingportal/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/nettingportal/singularity_pull()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/projectile/energy/trap
|
||||
name = "energy snare"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
knockdown = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 4
|
||||
|
||||
/obj/item/projectile/energy/trap/on_hit(atom/target, blocked = FALSE)
|
||||
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - drop a trap
|
||||
new/obj/item/restraints/legcuffs/beartrap/energy(get_turf(loc))
|
||||
else if(iscarbon(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy(get_turf(target))
|
||||
B.Crossed(target)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/on_range()
|
||||
new /obj/item/restraints/legcuffs/beartrap/energy(loc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg
|
||||
name = "Energy Bola"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
knockdown = 0
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_hit(atom/target, blocked = FALSE)
|
||||
if(!ismob(target) || blocked >= 100)
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
if(iscarbon(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
|
||||
B.Crossed(target)
|
||||
QDEL_IN(src, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/energy/declone
|
||||
name = "radiation beam"
|
||||
icon_state = "declone"
|
||||
damage = 20
|
||||
damage_type = CLONE
|
||||
irradiate = 10
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
|
||||
/obj/item/projectile/energy/dart //ninja throwing dart
|
||||
name = "dart"
|
||||
icon_state = "toxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
knockdown = 100
|
||||
range = 7
|
||||
|
||||
/obj/item/projectile/energy/bolt //ebow bolts
|
||||
name = "bolt"
|
||||
icon_state = "cbbolt"
|
||||
damage = 8
|
||||
damage_type = TOX
|
||||
nodamage = 0
|
||||
knockdown = 100
|
||||
stutter = 5
|
||||
|
||||
/obj/item/projectile/energy/bolt/halloween
|
||||
name = "candy corn"
|
||||
icon_state = "candy_corn"
|
||||
|
||||
/obj/item/projectile/energy/bolt/large
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/energy/tesla
|
||||
name = "tesla bolt"
|
||||
icon_state = "tesla_projectile"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
var/chain
|
||||
|
||||
/obj/item/projectile/energy/tesla/fire(setAngle)
|
||||
if(firer)
|
||||
chain = firer.Beam(src, icon_state = "lightning[rand(1, 12)]", time = INFINITY, maxdistance = INFINITY)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/tesla/Destroy()
|
||||
qdel(chain)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/energy/tesla/revolver
|
||||
name = "energy orb"
|
||||
|
||||
/obj/item/projectile/energy/tesla/revolver/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
tesla_zap(target, 3, 10000)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/energy/tesla/cannon
|
||||
name = "tesla orb"
|
||||
|
||||
/obj/item/projectile/energy/tesla/cannon/on_hit(atom/target)
|
||||
. = ..()
|
||||
tesla_zap(target, 3, 10000, explosive = FALSE, stun_mobs = FALSE)
|
||||
qdel(src)
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/obj/item/projectile/energy/net
|
||||
name = "energy netting"
|
||||
icon_state = "e_netting"
|
||||
@@ -96,3 +97,103 @@
|
||||
/obj/item/projectile/energy/trap/cyborg/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
=======
|
||||
/obj/item/projectile/energy/net
|
||||
name = "energy netting"
|
||||
icon_state = "e_netting"
|
||||
damage = 10
|
||||
damage_type = STAMINA
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/net/Initialize()
|
||||
. = ..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/energy/net/on_hit(atom/target, blocked = FALSE)
|
||||
if(isliving(target))
|
||||
var/turf/Tloc = get_turf(target)
|
||||
if(!locate(/obj/effect/nettingportal) in Tloc)
|
||||
new /obj/effect/nettingportal(Tloc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/net/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/effect/nettingportal
|
||||
name = "DRAGnet teleportation field"
|
||||
desc = "A field of bluespace energy, locking on to teleport a target."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dragnetfield"
|
||||
light_range = 3
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/nettingportal/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/device/beacon/teletarget = null
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
teletarget = com.target
|
||||
|
||||
addtimer(CALLBACK(src, .proc/pop, teletarget), 30)
|
||||
|
||||
/obj/effect/nettingportal/proc/pop(teletarget)
|
||||
if(teletarget)
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, teletarget, 2)//teleport what's in the tile to the beacon
|
||||
else
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, L, 15) //Otherwise it just warps you off somewhere.
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/nettingportal/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/nettingportal/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/item/projectile/energy/trap
|
||||
name = "energy snare"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
knockdown = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 4
|
||||
|
||||
/obj/item/projectile/energy/trap/on_hit(atom/target, blocked = FALSE)
|
||||
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - drop a trap
|
||||
new/obj/item/restraints/legcuffs/beartrap/energy(get_turf(loc))
|
||||
else if(iscarbon(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy(get_turf(target))
|
||||
B.Crossed(target)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/on_range()
|
||||
new /obj/item/restraints/legcuffs/beartrap/energy(loc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg
|
||||
name = "Energy Bola"
|
||||
icon_state = "e_snare"
|
||||
nodamage = 1
|
||||
knockdown = 0
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
range = 10
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_hit(atom/target, blocked = FALSE)
|
||||
if(!ismob(target) || blocked >= 100)
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
if(iscarbon(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
|
||||
B.Crossed(target)
|
||||
QDEL_IN(src, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
>>>>>>> 5140cff... [reviewpls] Adds moodlets to the game - [Please give suggestions for trait additions in comments] (#35475)
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
do_sparks(1, TRUE, src)
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, C)
|
||||
if(mood)
|
||||
mood.add_event("tased", /datum/mood_event/tased)
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
else if((C.status_flags & CANKNOCKDOWN) && !C.has_trait(TRAIT_STUNIMMUNE))
|
||||
|
||||
@@ -303,6 +303,9 @@
|
||||
need_mob_update += R.addiction_act_stage4(C)
|
||||
if(40 to INFINITY)
|
||||
to_chat(C, "<span class='notice'>You feel like you've gotten over your need for [R.name].</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, C)
|
||||
if(mood)
|
||||
mood.clear_event("[R.id]_addiction")
|
||||
cached_addictions.Remove(R)
|
||||
addiction_tick++
|
||||
if(C && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates.
|
||||
|
||||
@@ -91,24 +91,39 @@
|
||||
|
||||
/datum/reagent/proc/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='userdanger'>You feel like you took too much of [name]!</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("[id]_overdose", /datum/mood_event/drugs/overdose, name)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage1(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("[id]_overdose", /datum/mood_event/drugs/withdrawal_light, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='notice'>You feel like having some [name] right about now.</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage2(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("[id]_overdose", /datum/mood_event/drugs/withdrawal_medium, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='notice'>You feel like you need [name]. You just can't get enough.</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage3(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("[id]_overdose", /datum/mood_event/drugs/withdrawal_severe, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='danger'>You have an intense craving for [name].</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage4(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("[id]_overdose", /datum/mood_event/drugs/withdrawal_critical, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='boldannounce'>You're not feeling good at all! You really need some [name].</span>")
|
||||
return
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
id = "drug"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "bitterness"
|
||||
var/trippy = TRUE //Does this drug make you trip?
|
||||
|
||||
/datum/reagent/drug/on_mob_delete(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood && trippy)
|
||||
mood.clear_event("[id]_high")
|
||||
|
||||
/datum/reagent/drug/space_drugs
|
||||
name = "Space drugs"
|
||||
@@ -23,7 +29,9 @@
|
||||
|
||||
/datum/reagent/drug/space_drugs/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='userdanger'>You start tripping hard!</span>")
|
||||
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("[id]_overdose", /datum/mood_event/drugs/overdose, name)
|
||||
|
||||
/datum/reagent/drug/space_drugs/overdose_process(mob/living/M)
|
||||
if(M.hallucination < volume && prob(20))
|
||||
@@ -38,11 +46,15 @@
|
||||
color = "#60A584" // rgb: 96, 165, 132
|
||||
addiction_threshold = 30
|
||||
taste_description = "smoke"
|
||||
trippy = FALSE
|
||||
|
||||
/datum/reagent/drug/nicotine/on_mob_life(mob/living/M)
|
||||
if(prob(1))
|
||||
var/smoke_message = pick("You feel relaxed.", "You feel calmed.","You feel alert.","You feel rugged.")
|
||||
to_chat(M, "<span class='notice'>[smoke_message]</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood)
|
||||
mood.add_event("smoked", /datum/mood_event/drugs/smoked, name)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
@@ -57,6 +69,7 @@
|
||||
taste_description = "mint"
|
||||
reagent_state = LIQUID
|
||||
color = "#80AF9C"
|
||||
trippy = FALSE
|
||||
|
||||
/datum/reagent/drug/crank
|
||||
name = "Crank"
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/mushroomhallucinogen
|
||||
/datum/reagent/drug/mushroomhallucinogen
|
||||
name = "Mushroom Hallucinogen"
|
||||
id = "mushroomhallucinogen"
|
||||
description = "A strong hallucinogenic drug derived from certain species of mushroom."
|
||||
|
||||
@@ -56,10 +56,15 @@
|
||||
/obj/effect/proc_holder/spell/targeted/mime/speak/cast(list/targets,mob/user = usr)
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
H.mind.miming=!H.mind.miming
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(H.mind.miming)
|
||||
to_chat(H, "<span class='notice'>You make a vow of silence.</span>")
|
||||
if(mood)
|
||||
mood.clear_event("vow")
|
||||
else
|
||||
to_chat(H, "<span class='notice'>You break your vow of silence.</span>")
|
||||
if(mood)
|
||||
mood.add_event("vow", /datum/mood_event/broken_vow)
|
||||
|
||||
// These spells can only be gotten from the "Guide for Advanced Mimery series" for Mime Traitors.
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@
|
||||
to_chat(C, "<span class='warning'>The [item_to_retrieve] that was embedded in your [L] has mysteriously vanished. How fortunate!</span>")
|
||||
if(!C.has_embedded_objects())
|
||||
C.clear_alert("embeddedobject")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, C)
|
||||
if(mood)
|
||||
mood.clear_event("embedded")
|
||||
break
|
||||
|
||||
else
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
affecting.receive_damage(CLAMP(brute_dam/2, 15, 50), CLAMP(burn_dam/2, 0, 50)) //Damage the chest based on limb's existing damage
|
||||
C.visible_message("<span class='danger'><B>[C]'s [src.name] has been violently dismembered!</B></span>")
|
||||
C.emote("scream")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, C)
|
||||
if(mood)
|
||||
mood.add_event("dismembered", /datum/mood_event/dismembered)
|
||||
drop_limb()
|
||||
|
||||
if(dam_type == BURN)
|
||||
@@ -101,6 +104,9 @@
|
||||
I.forceMove(src)
|
||||
if(!C.has_embedded_objects())
|
||||
C.clear_alert("embeddedobject")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, C)
|
||||
if(mood)
|
||||
mood.add_event("embedded")
|
||||
|
||||
if(!special)
|
||||
if(C.dna)
|
||||
|
||||
@@ -121,6 +121,9 @@
|
||||
I.forceMove(T)
|
||||
|
||||
clear_alert("embeddedobject")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, src)
|
||||
if(mood)
|
||||
mood.clear_event("embedded")
|
||||
|
||||
/mob/living/carbon/proc/has_embedded_objects()
|
||||
. = 0
|
||||
|
||||
@@ -36,21 +36,32 @@
|
||||
H.blur_eyes(3) //We need to add more shit down here
|
||||
|
||||
H.adjust_disgust(-0.5 * disgust_metabolism)
|
||||
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
switch(H.disgust)
|
||||
if(0 to DISGUST_LEVEL_GROSS)
|
||||
H.clear_alert("disgust")
|
||||
if(mood)
|
||||
mood.clear_event("disgust")
|
||||
if(DISGUST_LEVEL_GROSS to DISGUST_LEVEL_VERYGROSS)
|
||||
H.throw_alert("disgust", /obj/screen/alert/gross)
|
||||
if(mood)
|
||||
mood.add_event("disgust", /datum/mood_event/disgust/gross)
|
||||
if(DISGUST_LEVEL_VERYGROSS to DISGUST_LEVEL_DISGUSTED)
|
||||
H.throw_alert("disgust", /obj/screen/alert/verygross)
|
||||
if(mood)
|
||||
mood.add_event("disgust", /datum/mood_event/disgust/verygross)
|
||||
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
|
||||
H.throw_alert("disgust", /obj/screen/alert/disgusted)
|
||||
if(mood)
|
||||
mood.add_event("disgust", /datum/mood_event/disgust/disgusted)
|
||||
|
||||
/obj/item/organ/stomach/Remove(mob/living/carbon/M, special = 0)
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(istype(H))
|
||||
H.clear_alert("disgust")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood)
|
||||
mood.clear_event("disgust")
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
L.embedded_objects -= I
|
||||
if(!H.has_embedded_objects())
|
||||
H.clear_alert("embeddedobject")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
|
||||
if(mood)
|
||||
mood.clear_event("embedded")
|
||||
|
||||
if(objects > 0)
|
||||
user.visible_message("[user] successfully removes [objects] objects from [H]'s [L]!", "<span class='notice'>You successfully remove [objects] objects from [H]'s [L.name].</span>")
|
||||
|
||||
Reference in New Issue
Block a user