[reviewpls] Adds moodlets to the game - [Please give suggestions for trait additions in comments]

This commit is contained in:
Qustinnus
2018-03-08 02:15:57 +01:00
committed by CitadelStationBot
parent 4d0b7133c8
commit a96a28f3d6
86 changed files with 1220 additions and 43 deletions
@@ -4,6 +4,7 @@
var/list/random_icon_states = list()
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
var/beauty = 0
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
@@ -16,6 +17,7 @@
if(C != src && C.type == src.type && !QDELETED(C))
if (replace_decal(C))
return INITIALIZE_HINT_QDEL
if(LAZYLEN(diseases))
var/list/datum/disease/diseases_to_add = list()
for(var/datum/disease/D in diseases)
@@ -24,6 +26,11 @@
if(LAZYLEN(diseases_to_add))
AddComponent(/datum/component/infective, diseases_to_add)
/obj/effect/decal/cleanable/LateInitialize()
if(src.loc && isturf(src.loc))
var/area/A = get_area(src)
A.beauty += beauty / max(1, A.areasize) //Ensures that the effects scale with room size
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
if(mergeable_decal)
return TRUE
@@ -90,3 +97,8 @@
return bloodiness
else
return 0
/obj/effect/decal/cleanable/Destroy()
if(src.loc && isturf(src.loc))
var/area/A = get_area(src)
A.beauty -= beauty / max(1, A.areasize)
@@ -8,6 +8,7 @@
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
bloodiness = MAX_SHOE_BLOODINESS
blood_state = BLOOD_STATE_XENO
beauty = -200
/obj/effect/decal/cleanable/xenoblood/Initialize()
. = ..()
@@ -6,6 +6,7 @@
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
blood_state = BLOOD_STATE_HUMAN
bloodiness = MAX_SHOE_BLOODINESS
beauty = -200
/obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C)
C.add_blood_DNA(return_blood_DNA())
@@ -3,6 +3,7 @@
desc = "Someone should clean that up."
icon = 'icons/obj/objects.dmi'
icon_state = "shards"
beauty = -150
/obj/effect/decal/cleanable/ash
name = "ashes"
@@ -10,6 +11,7 @@
icon = 'icons/obj/objects.dmi'
icon_state = "ash"
mergeable_decal = FALSE
beauty = -150
/obj/effect/decal/cleanable/ash/Initialize()
. = ..()
@@ -24,6 +26,7 @@
/obj/effect/decal/cleanable/ash/large
name = "large pile of ashes"
icon_state = "big_ash"
beauty = -150
/obj/effect/decal/cleanable/ash/large/Initialize()
. = ..()
@@ -34,6 +37,7 @@
desc = "Back to sand."
icon = 'icons/obj/shards.dmi'
icon_state = "tiny"
beauty = -20
/obj/effect/decal/cleanable/glass/Initialize()
. = ..()
@@ -47,17 +51,20 @@
desc = "Someone should clean that up."
icon_state = "dirt"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
beauty = -150
/obj/effect/decal/cleanable/flour
name = "flour"
desc = "It's still good. Four second rule!"
icon_state = "flour"
beauty = -100
/obj/effect/decal/cleanable/greenglow
name = "glowing goo"
desc = "Jeez. I hope that's not for lunch."
light_color = LIGHT_COLOR_GREEN
icon_state = "greenglow"
beauty = -100
/obj/effect/decal/cleanable/greenglow/Initialize(mapload)
. = ..()
@@ -73,6 +80,7 @@
layer = WALL_OBJ_LAYER
icon_state = "cobweb1"
resistance_flags = FLAMMABLE
beauty = -150
/obj/effect/decal/cleanable/cobweb/cobweb2
icon_state = "cobweb2"
@@ -84,10 +92,12 @@
icon = 'icons/effects/effects.dmi'
icon_state = "molten"
mergeable_decal = FALSE
beauty = -250
/obj/effect/decal/cleanable/molten_object/large
name = "big gooey grey mass"
icon_state = "big_molten"
beauty = -200
//Vomit (sorry)
/obj/effect/decal/cleanable/vomit
@@ -96,6 +106,7 @@
icon = 'icons/effects/blood.dmi'
icon_state = "vomit_1"
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
beauty = -400
/obj/effect/decal/cleanable/vomit/attack_hand(mob/user)
if(ishuman(user))
@@ -127,12 +138,14 @@
gender = NEUTER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
beauty = -125
/obj/effect/decal/cleanable/plant_smudge
name = "plant smudge"
gender = NEUTER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_plant")
beauty = -125
/obj/effect/decal/cleanable/egg_smudge
name = "smashed egg"
@@ -140,6 +153,7 @@
gender = NEUTER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
beauty = -125
/obj/effect/decal/cleanable/pie_smudge //honk
name = "smashed pie"
@@ -147,6 +161,7 @@
gender = NEUTER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_pie")
beauty = -125
/obj/effect/decal/cleanable/chem_pile
name = "chemical pile"
@@ -154,6 +169,7 @@
gender = NEUTER
icon = 'icons/obj/objects.dmi'
icon_state = "ash"
beauty = -125
/obj/effect/decal/cleanable/shreds
name = "shreds"
@@ -161,6 +177,7 @@
icon_state = "shreds"
gender = PLURAL
mergeable_decal = FALSE
beauty = -125
/obj/effect/decal/cleanable/shreds/ex_act(severity, target)
if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion.
@@ -177,12 +194,14 @@
icon = 'icons/effects/tomatodecal.dmi'
icon_state = "salt_pile"
gender = NEUTER
beauty = -125
/obj/effect/decal/cleanable/glitter
name = "generic glitter pile"
desc = "The herpes of arts and crafts."
icon = 'icons/effects/tile_effects.dmi'
gender = NEUTER
beauty = 300
/obj/effect/decal/cleanable/glitter/pink
name = "pink glitter"
@@ -200,4 +219,5 @@
name = "stabilized plasma"
desc = "A puddle of stabilized plasma."
icon_state = "flour"
color = "#C8A5DC"
color = "#C8A5DC"
beauty = -200
@@ -10,6 +10,7 @@
blood_state = BLOOD_STATE_OIL
bloodiness = MAX_SHOE_BLOODINESS
mergeable_decal = FALSE
beauty = -200
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
set waitfor = 0
@@ -46,6 +47,7 @@
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
blood_state = BLOOD_STATE_OIL
bloodiness = MAX_SHOE_BLOODINESS
beauty = -125
/obj/effect/decal/cleanable/oil/Initialize()
. = ..()
@@ -57,4 +59,4 @@
/obj/effect/decal/cleanable/oil/slippery
/obj/effect/decal/cleanable/oil/slippery/Initialize()
AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE))
AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE))
+1 -1
View File
@@ -30,4 +30,4 @@
/obj/effect/decal/cleanable/robot_debris/old
name = "dusty robot debris"
desc = "Looks like nobody has touched this in a while."
desc = "Looks like nobody has touched this in a while."
+4
View File
@@ -531,6 +531,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
else
M.take_bodypart_damage(7)
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
if(mood)
mood.add_event("eye_stab", /datum/mood_event/eye_stab)
add_logs(user, M, "attacked", "[src.name]", "(INTENT: [uppertext(user.a_intent)])")
M.adjust_blurriness(3)
+1
View File
@@ -191,6 +191,7 @@
FD.CalculateAffectingAreas()
to_chat(usr, "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>")
log_game("[key_name(usr)] has renamed [prevname] to [str]")
A.update_area_size()
interact()
return 1
+3
View File
@@ -549,6 +549,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? "r_hand" : "l_hand"
user.apply_damage(5, BURN, hitzone)
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
if(mood)
mood.add_event("burnt_thumb", /datum/mood_event/burnt_thumb)
else
set_lit(FALSE)
+5
View File
@@ -116,6 +116,11 @@
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
if(mood)
mood.add_event("honk", /datum/mood_event/honk)
/obj/item/bikehorn/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
+3
View File
@@ -96,6 +96,9 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
H.visible_message("<span class='notice'>[user] heals [H] with the power of [deity_name]!</span>")
to_chat(H, "<span class='boldnotice'>May the power of [deity_name] compel you to be healed!</span>")
playsound(src.loc, "punch", 25, 1, -1)
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
if(mood)
mood.add_event("blessing", /datum/mood_event/blessing)
return 1
/obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
+11 -1
View File
@@ -95,7 +95,17 @@
pushed_mob.visible_message("<span class='danger'>[user] pushes [pushed_mob] onto [src].</span>", \
"<span class='userdanger'>[user] pushes [pushed_mob] onto [src].</span>")
add_logs(user, pushed_mob, "pushed")
if(!ishuman(pushed_mob))
return
var/mob/living/carbon/human/H = pushed_mob
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
if(mood)
if(iscatperson(H)) //Catpeople are a bit dumb and think its fun to be on a table
mood.add_event("table", /datum/mood_event/happytable)
H.startTailWag()
addtimer(CALLBACK(H, /mob/living/carbon/human.proc/endTailWag), 30)
else
mood.add_event("table", /datum/mood_event/table)
/obj/structure/table/attackby(obj/item/I, mob/user, params)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -335,6 +335,9 @@
L.ExtinguishMob()
L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
L.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
GET_COMPONENT_FROM(mood, /datum/component/mood, L)
if(mood)
mood.add_event("shower", /datum/mood_event/nice_shower)
if(iscarbon(L))
var/mob/living/carbon/M = L
. = TRUE