/tg/ 4/14 (#367)
* outside code stuff * defines, helpers, etc * everything not module * modules * compiled fixes + missing sounds
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/datum/emote/living/alien
|
||||
mob_type_allowed_typecache = list(/mob/living/carbon/alien)
|
||||
|
||||
/datum/emote/living/alien/gnarl
|
||||
key = "gnarl"
|
||||
key_third_person = "gnarls"
|
||||
message = "gnarls and shows its teeth..."
|
||||
|
||||
/datum/emote/living/alien/hiss
|
||||
key = "hiss"
|
||||
key_third_person = "hisses"
|
||||
message_alien = "hisses."
|
||||
message_larva = "hisses softly."
|
||||
|
||||
/datum/emote/living/alien/hiss/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && isalienadult(user))
|
||||
playsound(user.loc, "hiss", 40, 1, 1)
|
||||
|
||||
/datum/emote/living/alien/roar
|
||||
key = "roar"
|
||||
key_third_person = "roars"
|
||||
message_alien = "roars"
|
||||
message_larva = "softly roars"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/alien/roar/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && isalienadult(user))
|
||||
playsound(user.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
|
||||
@@ -1,88 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/emote(act,m_type=1,message = null)
|
||||
|
||||
var/param = null
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
var/muzzled = is_muzzled()
|
||||
|
||||
switch(act) //Alphabetical please
|
||||
if ("deathgasp","deathgasps")
|
||||
message = "<span class='name'>[src]</span> lets out a waning guttural screech, green blood bubbling from its maw..."
|
||||
m_type = 2
|
||||
|
||||
if ("gnarl","gnarls")
|
||||
if (!muzzled)
|
||||
message = "<span class='name'>[src]</span> gnarls and shows its teeth.."
|
||||
m_type = 2
|
||||
|
||||
if ("hiss","hisses")
|
||||
if(!muzzled)
|
||||
message = "<span class='name'>[src]</span> hisses."
|
||||
m_type = 2
|
||||
|
||||
if ("me")
|
||||
..()
|
||||
return
|
||||
|
||||
if ("moan","moans")
|
||||
message = "<span class='name'>[src]</span> moans!"
|
||||
m_type = 2
|
||||
|
||||
if ("roar","roars")
|
||||
if (!muzzled)
|
||||
message = "<span class='name'>[src]</span> roars."
|
||||
m_type = 2
|
||||
|
||||
if ("roll","rolls")
|
||||
if (!src.restrained())
|
||||
message = "<span class='name'>[src]</span> rolls."
|
||||
m_type = 1
|
||||
|
||||
if ("scratch","scratches")
|
||||
if (!src.restrained())
|
||||
message = "<span class='name'>[src]</span> scratches."
|
||||
m_type = 1
|
||||
|
||||
if ("screech","screeches")
|
||||
if (!muzzled)
|
||||
message = "<span class='name'>[src]</span> screeches."
|
||||
m_type = 2
|
||||
|
||||
if ("shiver","shivers")
|
||||
message = "<span class='name'>[src]</span> shivers."
|
||||
m_type = 2
|
||||
|
||||
if ("sign","signs")
|
||||
if (!src.restrained())
|
||||
message = text("<span class='name'>[src]</span> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
|
||||
m_type = 1
|
||||
|
||||
if ("tail")
|
||||
message = "<span class='name'>[src]</span> waves its tail."
|
||||
m_type = 1
|
||||
|
||||
if ("help") //This is an exception
|
||||
src << "Help for xenomorph emotes. You can use these emotes with say \"*emote\":\n\naflap, airguitar, blink, blink_r, blush, bow, burp, choke, chucke, clap, collapse, cough, dance, deathgasp, drool, flap, frown, gasp, giggle, glare-(none)/mob, gnarl, hiss, jump, laugh, look-atom, me, moan, nod, point-atom, roar, roll, scream, scratch, screech, shake, shiver, sign-#, sit, smile, sneeze, sniff, snore, stare-(none)/mob, sulk, sway, tail, tremble, twitch, twitch_s, wave, whimper, wink, yawn"
|
||||
|
||||
else
|
||||
..(act)
|
||||
|
||||
if ((message && src.stat == 0))
|
||||
log_emote("[name]/[key] : [message]")
|
||||
if (act == "roar")
|
||||
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
|
||||
|
||||
if (act == "hiss")
|
||||
playsound(src.loc, "hiss", 40, 1, 1)
|
||||
|
||||
if (act == "deathgasp")
|
||||
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
||||
|
||||
if (m_type & 1)
|
||||
visible_message(message)
|
||||
else
|
||||
audible_message(message)
|
||||
return
|
||||
@@ -234,9 +234,11 @@
|
||||
if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
|
||||
if(href_list["embedded_object"])
|
||||
var/obj/item/I = locate(href_list["embedded_object"])
|
||||
var/obj/item/bodypart/L = locate(href_list["embedded_limb"])
|
||||
if(!I || !L || I.loc != src || !(I in L.embedded_objects)) //no item, no limb, or item is not in limb or in the person anymore
|
||||
var/obj/item/bodypart/L = locate(href_list["embedded_limb"]) in bodyparts
|
||||
if(!L)
|
||||
return
|
||||
var/obj/item/I = locate(href_list["embedded_object"]) in L.embedded_objects
|
||||
if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore
|
||||
return
|
||||
var/time_taken = I.embedded_unsafe_removal_time*I.w_class
|
||||
usr.visible_message("<span class='warning'>[usr] attempts to remove [I] from their [L.name].</span>","<span class='notice'>You attempt to remove [I] from your [L.name]... (It will take [time_taken/10] seconds.)</span>")
|
||||
@@ -921,18 +923,14 @@
|
||||
return
|
||||
if(!riding_datum)
|
||||
riding_datum = new /datum/riding/human(src)
|
||||
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)))
|
||||
return
|
||||
if(buckled) //NO INFINITE STACKING!!
|
||||
return
|
||||
if(M.stat != CONSCIOUS)
|
||||
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)) || buckled || (M.stat != CONSCIOUS))
|
||||
return
|
||||
if(iscarbon(M))
|
||||
if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
|
||||
M.visible_message("<span class='boldwarning'>[M] can't hang onto [src]!</span>")
|
||||
M.visible_message("<span class='warning'>[M] can't hang onto [src]!</span>")
|
||||
return
|
||||
if(!riding_datum.equip_buckle_inhands(M, 2)) //MAKE SURE THIS IS LAST!!
|
||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because [M.p_their()] hands are full!</span>")
|
||||
M.visible_message("<span class='warning'>[M] can't climb onto [src]!</span>")
|
||||
return
|
||||
. = ..(M, force, check_loc)
|
||||
stop_pulling()
|
||||
|
||||
@@ -685,7 +685,7 @@
|
||||
to_chat(src, "\t [status == "OK" ? "\blue" : "\red"] Your [LB.name] is [status].")
|
||||
|
||||
for(var/obj/item/I in LB.embedded_objects)
|
||||
to_chat(src, "\t <a href='byond://?src=\ref[src];embedded_object=\ref[I];embedded_limb=\ref[LB]'>\red There is \a [I] embedded in your [LB.name]!</a>")
|
||||
to_chat(src, "\t <a href='byond://?src=\ref[src];embedded_object=\ref[I];embedded_limb=\ref[LB]'class='warning'> There is \a [I] embedded in your [LB.name]!</a>")
|
||||
|
||||
for(var/t in missing)
|
||||
to_chat(src, "<span class='boldannounce'>Your [parse_zone(t)] is missing!</span>")
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/4))
|
||||
BP.change_bodypart_status(BODYPART_ROBOTIC)
|
||||
BP.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE)
|
||||
update_icons()
|
||||
update_damage_overlays()
|
||||
functions = list("nearbyscan","combat","shitcurity","chatter") // stop customize adding multiple copies of a function
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
return not_handled //For future deeper overrides
|
||||
|
||||
/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop)
|
||||
/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE)
|
||||
. = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should.
|
||||
if(!. || !I)
|
||||
return
|
||||
|
||||
@@ -117,6 +117,12 @@
|
||||
if(thing && (!thing.species_exception || !is_type_in_list(src,thing.species_exception)))
|
||||
C.dropItemToGround(thing)
|
||||
|
||||
// this needs to be FIRST because qdel calls update_body which checks if we have DIGITIGRADE legs or not and if not then removes DIGITIGRADE from species_traits
|
||||
if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs")
|
||||
species_traits += DIGITIGRADE
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(FALSE)
|
||||
|
||||
var/obj/item/organ/heart/heart = C.getorganslot("heart")
|
||||
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
|
||||
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
|
||||
@@ -157,10 +163,7 @@
|
||||
|
||||
if(exotic_bloodtype && C.dna.blood_type != exotic_bloodtype)
|
||||
C.dna.blood_type = exotic_bloodtype
|
||||
if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs")
|
||||
species_traits += DIGITIGRADE
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(FALSE)
|
||||
|
||||
if(NOAROUSAL in species_traits)
|
||||
C.canbearoused = FALSE
|
||||
else
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
. = ..()
|
||||
for(var/X in C.bodyparts)
|
||||
var/obj/item/bodypart/O = X
|
||||
O.change_bodypart_status(BODYPART_ROBOTIC)
|
||||
O.change_bodypart_status(BODYPART_ROBOTIC, 0, 1)
|
||||
|
||||
/datum/species/android/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
for(var/X in C.bodyparts)
|
||||
var/obj/item/bodypart/O = X
|
||||
O.change_bodypart_status(BODYPART_ORGANIC)
|
||||
O.change_bodypart_status(BODYPART_ORGANIC,FALSE, TRUE)
|
||||
@@ -132,6 +132,10 @@
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/monkey/proc/handle_combat()
|
||||
// Don't do any AI if inside another mob (devoured)
|
||||
if (ismob(loc))
|
||||
// Really no idea what needs to be returned but everything else is TRUE
|
||||
return TRUE
|
||||
|
||||
if(on_fire || buckled || restrained())
|
||||
if(!resisting && prob(MONKEY_RESIST_PROB))
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
basic_modules = list(
|
||||
/obj/item/device/assembly/flash/cyborg,
|
||||
/obj/item/borg/sight/meson,
|
||||
/obj/item/weapon/rcd/borg,
|
||||
/obj/item/weapon/construction/rcd/borg,
|
||||
/obj/item/weapon/pipe_dispenser,
|
||||
/obj/item/weapon/extinguisher,
|
||||
/obj/item/weapon/weldingtool/largetank/cyborg,
|
||||
|
||||
@@ -338,7 +338,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
to_chat(src, "<span class='danger'><B>You don't have another mode!</span></B>")
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/proc/ToggleLight()
|
||||
if(!luminosity)
|
||||
if(light_range<3)
|
||||
to_chat(src, "<span class='notice'>You activate your light.</span>")
|
||||
set_light(3)
|
||||
else
|
||||
|
||||
@@ -326,7 +326,7 @@ Difficulty: Hard
|
||||
pools_to_remove = get_pools(get_turf(target), 1)
|
||||
pools -= pools_to_remove
|
||||
if(pools.len)
|
||||
shuffle(pools)
|
||||
shuffle_inplace(pools)
|
||||
found_bloodpool = pick(pools)
|
||||
if(found_bloodpool)
|
||||
visible_message("<span class='danger'>[src] sinks into the blood...</span>")
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
if(admin_spawned)
|
||||
return FALSE
|
||||
|
||||
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
for(var/mob/living/L in view(7,src))
|
||||
if(L.stat)
|
||||
continue
|
||||
@@ -135,11 +135,11 @@
|
||||
|
||||
if(!player || !medal)
|
||||
return
|
||||
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
spawn()
|
||||
var/result = world.SetMedal(medal, player, GLOB.medal_hub, GLOB.medal_pass)
|
||||
var/result = world.SetMedal(medal, player, global.medal_hub, global.medal_pass)
|
||||
if(isnull(result))
|
||||
GLOB.medals_enabled = FALSE
|
||||
global.medals_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to award medal:[medal] player:[player.ckey]")
|
||||
message_admins("Error! Failed to contact hub to award [medal] medal to [player.ckey]!")
|
||||
else if (result)
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
if(!score || !player)
|
||||
return
|
||||
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
spawn()
|
||||
var/list/oldscore = GetScore(score,player,1)
|
||||
|
||||
@@ -164,10 +164,10 @@
|
||||
|
||||
var/newscoreparam = list2params(oldscore)
|
||||
|
||||
var/result = world.SetScores(player.ckey, newscoreparam, GLOB.medal_hub, GLOB.medal_pass)
|
||||
var/result = world.SetScores(player.ckey, newscoreparam, global.medal_hub, global.medal_pass)
|
||||
|
||||
if(isnull(result))
|
||||
GLOB.medals_enabled = FALSE
|
||||
global.medals_enabled = FALSE
|
||||
log_game("SCORE ERROR: Could not contact hub to set score. Score:[score] player:[player.ckey]")
|
||||
message_admins("Error! Failed to contact hub to set [score] score for [player.ckey]!")
|
||||
|
||||
@@ -176,11 +176,11 @@
|
||||
|
||||
if(!score || !player)
|
||||
return
|
||||
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
|
||||
var/scoreget = world.GetScores(player.ckey, score, GLOB.medal_hub, GLOB.medal_pass)
|
||||
var/scoreget = world.GetScores(player.ckey, score, global.medal_hub, global.medal_pass)
|
||||
if(isnull(scoreget))
|
||||
GLOB.medals_enabled = FALSE
|
||||
global.medals_enabled = FALSE
|
||||
log_game("SCORE ERROR: Could not contact hub to get score. Score:[score] player:[player.ckey]")
|
||||
message_admins("Error! Failed to contact hub to get score: [score] for [player.ckey]!")
|
||||
return
|
||||
@@ -197,12 +197,12 @@
|
||||
|
||||
if(!player || !medal)
|
||||
return
|
||||
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
|
||||
var/result = world.GetMedal(medal, player, GLOB.medal_hub, GLOB.medal_pass)
|
||||
var/result = world.GetMedal(medal, player, global.medal_hub, global.medal_pass)
|
||||
|
||||
if(isnull(result))
|
||||
GLOB.medals_enabled = FALSE
|
||||
global.medals_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to get medal:[medal] player:[player.ckey]")
|
||||
message_admins("Error! Failed to contact hub to get [medal] medal for [player.ckey]!")
|
||||
else if (result)
|
||||
@@ -212,12 +212,12 @@
|
||||
|
||||
if(!player || !medal)
|
||||
return
|
||||
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
|
||||
var/result = world.ClearMedal(medal, player, GLOB.medal_hub, GLOB.medal_pass)
|
||||
var/result = world.ClearMedal(medal, player, global.medal_hub, global.medal_pass)
|
||||
|
||||
if(isnull(result))
|
||||
GLOB.medals_enabled = FALSE
|
||||
global.medals_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to clear medal:[medal] player:[player.ckey]")
|
||||
message_admins("Error! Failed to contact hub to clear [medal] medal for [player.ckey]!")
|
||||
else if (result)
|
||||
@@ -227,6 +227,6 @@
|
||||
|
||||
|
||||
/proc/ClearScore(client/player)
|
||||
world.SetScores(player.ckey, "", GLOB.medal_hub, GLOB.medal_pass)
|
||||
world.SetScores(player.ckey, "", global.medal_hub, global.medal_pass)
|
||||
|
||||
#undef MEDAL_PREFIX
|
||||
|
||||
@@ -1014,7 +1014,7 @@
|
||||
last_tendril = FALSE
|
||||
break
|
||||
if(last_tendril && !admin_spawned)
|
||||
if(GLOB.medal_hub && GLOB.medal_pass && GLOB.medals_enabled)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
for(var/mob/living/L in view(7,src))
|
||||
if(L.stat)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user