mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise
Conflicts: code/game/objects/items/weapons/kitchen.dm
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
#define EMOTE_COOLDOWN 50 //Time in deciseconds that the cooldown lasts
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
/mob/proc/handle_emote_CD()
|
||||
if(emote_cd == 2) return 1 // Cooldown emotes were disabled by an admin, prevent use
|
||||
if(src.emote_cd == 1) return 1 // Already on CD, prevent use
|
||||
|
||||
src.emote_cd = 1 // Starting cooldown
|
||||
spawn(EMOTE_COOLDOWN)
|
||||
if(emote_cd == 2) return 1 // Don't reset if cooldown emotes were disabled by an admin during the cooldown
|
||||
src.emote_cd = 0 // Cooldown complete, ready for more!
|
||||
|
||||
return 0 // Proceed with emote
|
||||
//--FalseIncarnate
|
||||
|
||||
// All mobs should have custom emote, really..
|
||||
/mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
|
||||
|
||||
@@ -20,69 +20,100 @@
|
||||
|
||||
if(src.stat == 2.0 && (act != "deathgasp"))
|
||||
return
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
switch(act)
|
||||
//Cooldown-inducing emotes
|
||||
if("ping","buzz","beep")
|
||||
if (species.name == "Machine") //Only Machines can beep, ping, and buzz
|
||||
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
|
||||
else //Everyone else fails, skip the emote attempt
|
||||
return
|
||||
if("squish")
|
||||
if(species.name == "Slime People") //Only Slime People can squish
|
||||
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
|
||||
else //Everyone else fails, skip the emote attempt
|
||||
return
|
||||
if("scream", "fart", "flip")
|
||||
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
|
||||
//Everything else, including typos of the above emotes
|
||||
else
|
||||
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
|
||||
if(on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
return // Suppress emote, you're still cooling off.
|
||||
//--FalseIncarnate
|
||||
|
||||
switch(act)
|
||||
if("ping")
|
||||
if (species.name == "Machine")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> pings at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> pings."
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
m_type = 1
|
||||
if (param)
|
||||
message = "<B>[src]</B> pings at [param]."
|
||||
else
|
||||
if (!species.name == "Machine")
|
||||
return
|
||||
message = "<B>[src]</B> pings."
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
m_type = 1
|
||||
|
||||
if("buzz")
|
||||
if (species.name == "Machine")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> buzzes at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> buzzes."
|
||||
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
m_type = 1
|
||||
if (param)
|
||||
message = "<B>[src]</B> buzzes at [param]."
|
||||
else
|
||||
if (!species.name == "Machine")
|
||||
return
|
||||
message = "<B>[src]</B> buzzes."
|
||||
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
m_type = 1
|
||||
|
||||
if("beep")
|
||||
if(species.name == "Machine")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> beeps at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> beeps."
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
m_type = 1
|
||||
if (param)
|
||||
message = "<B>[src]</B> beeps at [param]."
|
||||
else
|
||||
if (!species.name == "Machine")
|
||||
return
|
||||
message = "<B>[src]</B> beeps."
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
m_type = 1
|
||||
|
||||
if("squish")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> squishes at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> squishes."
|
||||
playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
|
||||
m_type = 1
|
||||
|
||||
if("wag")
|
||||
if(species.bodyflags & TAIL_WAGGING)
|
||||
@@ -204,6 +235,31 @@
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("flip")
|
||||
m_type = 1
|
||||
if (!src.restrained())
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(1, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (M == src)
|
||||
M = null
|
||||
|
||||
if (M)
|
||||
if(src.lying || src.weakened)
|
||||
message = "<B>[src]</B> flops and flails around on the floor."
|
||||
else
|
||||
message = "<B>[src]</B> flips in [M]'s general direction."
|
||||
src.SpinAnimation(5,1)
|
||||
else
|
||||
if(src.lying || src.weakened)
|
||||
message = "<B>[src]</B> flops and flails around on the floor."
|
||||
else
|
||||
message = "<B>[src]</B> does a flip!"
|
||||
src.SpinAnimation(5,1)
|
||||
|
||||
if ("aflap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his wings ANGRILY!"
|
||||
|
||||
@@ -208,7 +208,7 @@ emp_act
|
||||
user << "\red You sneakily slide the card into the dataport on [src]'s [affecting.display_name] and short out the safeties."
|
||||
affecting.sabotaged = 1
|
||||
return 1
|
||||
|
||||
|
||||
//Returns 1 if the attack hit, 0 if it missed.
|
||||
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
|
||||
if(!I || !user) return 0
|
||||
@@ -249,7 +249,7 @@ emp_act
|
||||
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
emag_act(user, affecting)
|
||||
|
||||
|
||||
if(! I.discrete)
|
||||
if(I.attack_verb.len)
|
||||
visible_message("\red <B>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!</B>")
|
||||
@@ -288,8 +288,10 @@ emp_act
|
||||
switch(hit_area)
|
||||
if("head")//Harder to score a stun but if you do it lasts a bit longer
|
||||
if(prob(I.force))
|
||||
apply_effect(20, PARALYZE, armor)
|
||||
visible_message("\red <B>[src] has been knocked unconscious!</B>")
|
||||
apply_effect(5, WEAKEN, armor)
|
||||
confused += 15
|
||||
visible_message("<span class='danger'>[src] has been knocked down!</span>", \
|
||||
"<span class='userdanger'>[src] has been knocked down!</span>")
|
||||
if(src != user && I.damtype == BRUTE)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
|
||||
@@ -340,7 +342,7 @@ emp_act
|
||||
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5)
|
||||
if(istype(AM,/obj/))
|
||||
var/obj/O = AM
|
||||
|
||||
|
||||
if(in_throw_mode && !get_active_hand() && speed <= 5) //empty active hand and we're in throw mode
|
||||
if(canmove && !restrained())
|
||||
if(isturf(O.loc))
|
||||
@@ -348,7 +350,7 @@ emp_act
|
||||
visible_message("<span class='warning'>[src] catches [O]!</span>")
|
||||
throw_mode_off()
|
||||
return
|
||||
|
||||
|
||||
var/zone = ran_zone("chest", 65)
|
||||
var/dtype = BRUTE
|
||||
if(istype(O,/obj/item/weapon))
|
||||
|
||||
@@ -11,6 +11,24 @@
|
||||
|
||||
var/muzzled = is_muzzled()
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
switch(act)
|
||||
//Cooldown-inducing emotes
|
||||
if("chirp")
|
||||
if(istype(src,/mob/living/carbon/monkey/diona)) //Only Diona Nymphs can chirp
|
||||
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
|
||||
else //Everyone else fails, skip the emote attempt
|
||||
return
|
||||
//Everything else, including typos of the above emotes
|
||||
else
|
||||
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
|
||||
if(on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
return // Suppress emote, you're still cooling off.
|
||||
//--FalseIncarnate
|
||||
|
||||
switch(act)
|
||||
if ("me")
|
||||
if(silent)
|
||||
@@ -32,10 +50,9 @@
|
||||
return custom_emote(m_type, message)
|
||||
|
||||
if ("chirp")
|
||||
if(istype(src,/mob/living/carbon/monkey/diona))
|
||||
message = "<B>The [src.name]</B> chirps!"
|
||||
playsound(src.loc, 'sound/misc/nymphchirp.ogg', 50, 0)
|
||||
m_type = 2
|
||||
message = "<B>The [src.name]</B> chirps!"
|
||||
playsound(src.loc, 'sound/misc/nymphchirp.ogg', 50, 0)
|
||||
m_type = 2
|
||||
if("sign")
|
||||
if (!src.restrained())
|
||||
message = text("<B>The monkey</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/mob/living/carbon/monkey/say(var/message)
|
||||
var/verb = "says"
|
||||
var/message_range = world.view
|
||||
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
|
||||
if(speaking)
|
||||
message = copytext(message, 2+length(speaking.key))
|
||||
|
||||
message = trim(message)
|
||||
|
||||
if(!message || stat)
|
||||
return
|
||||
|
||||
..(message, speaking, verb, null, null, message_range, null)
|
||||
@@ -8,6 +8,21 @@
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
switch(act)
|
||||
//Cooldown-inducing emotes
|
||||
if("ping","buzz","beep","law") //halt is exempt because it's used to stop criminal scum
|
||||
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
|
||||
//Everything else, including typos of the above emotes
|
||||
else
|
||||
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
|
||||
if(on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
return // Suppress emote, you're still cooling off.
|
||||
//--FalseIncarnate
|
||||
|
||||
switch(act)
|
||||
if ("me")
|
||||
if (src.client)
|
||||
|
||||
@@ -46,6 +46,10 @@
|
||||
projectilesound = 'sound/weapons/Gunshot.ogg'
|
||||
casingtype = /obj/item/ammo_casing/a357
|
||||
|
||||
/mob/living/simple_animal/hostile/russian/ranged/New()
|
||||
if(prob(50) && ispath(weapon1,/obj/item/weapon/gun/projectile/revolver/mateba)) //to preserve varedits
|
||||
weapon1 = /obj/item/weapon/gun/projectile/shotgun/boltaction
|
||||
casingtype = /obj/item/ammo_casing/a762
|
||||
|
||||
/mob/living/simple_animal/hostile/russian/Die()
|
||||
..()
|
||||
|
||||
+11
-19
@@ -855,7 +855,7 @@ var/list/slot_equipment_priority = list( \
|
||||
return 0
|
||||
src << message
|
||||
return 1
|
||||
|
||||
|
||||
/mob/proc/is_muzzled()
|
||||
return 0
|
||||
|
||||
@@ -873,25 +873,14 @@ var/list/slot_equipment_priority = list( \
|
||||
stat(null, "CPU:\t[world.cpu]")
|
||||
stat(null, "Instances:\t[world.contents.len]")
|
||||
|
||||
if(master_controller)
|
||||
/* HANDLED THROUGH PROCESS SCHEDULER
|
||||
stat(null, "MasterController-[last_tick_duration] ([master_controller.processing?"On":"Off"]-[controller_iteration])")
|
||||
stat(null, "Air-[master_controller.air_cost]")
|
||||
stat(null, "Sun-[master_controller.sun_cost]")
|
||||
stat(null, "Mob-[master_controller.mobs_cost]\t#[mob_list.len]")
|
||||
stat(null, "Dis-[master_controller.diseases_cost]\t#[active_diseases.len]")
|
||||
stat(null, "Mch-[master_controller.machines_cost]\t#[machines.len]")
|
||||
stat(null, "Bots-[master_controller.aibots_cost]\t#[aibots.len]")
|
||||
stat(null, "Obj-[master_controller.objects_cost]\t#[processing_objects.len]")
|
||||
stat(null, "PiNet-[master_controller.networks_cost]\t#[pipe_networks.len]")
|
||||
stat(null, "PoNet-[master_controller.powernets_cost]\t#[powernets.len]")
|
||||
stat(null, "NanoUI-[master_controller.nano_cost]\t#[nanomanager.processing_uis.len]")
|
||||
// stat(null, "GC-[master_controller.gc_cost]\t#[garbage.queue.len]")
|
||||
stat(null, "Tick-[master_controller.ticker_cost]")*/
|
||||
stat(null,"Events-[master_controller.events_cost]\t#[event_manager.active_events.len]")
|
||||
stat(null, "ALL-[master_controller.total_cost]")
|
||||
if (garbageCollector)
|
||||
stat(null, "\tqdel - [garbageCollector.del_everything ? "off" : "on"]")
|
||||
stat(null, "\ton queue - [garbageCollector.queue.len]")
|
||||
stat(null, "\ttotal delete - [garbageCollector.dels_count]")
|
||||
stat(null, "\tsoft delete - [garbageCollector.soft_dels]")
|
||||
stat(null, "\thard delete - [garbageCollector.hard_dels]")
|
||||
else
|
||||
stat(null, "MasterController-ERROR")
|
||||
stat(null, "Garbage Controller is not running.")
|
||||
|
||||
if(processScheduler.getIsRunning())
|
||||
var/datum/controller/process/process
|
||||
@@ -929,6 +918,9 @@ var/list/slot_equipment_priority = list( \
|
||||
process = processScheduler.getProcess("disease")
|
||||
stat(null, "DIS([active_diseases.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
process = processScheduler.getProcess("garbage")
|
||||
stat(null, "GAR\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
//process = processScheduler.getProcess("sun")
|
||||
//stat(null, "SUN\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
|
||||
var/coughedtime = null
|
||||
|
||||
var/emote_cd = 0 // Used to supress emote spamming. 1 if on CD, 2 if disabled by admin (manually set), else 0
|
||||
|
||||
var/inertia_dir = 0
|
||||
|
||||
var/music_lastplayed = "null"
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
|
||||
|
||||
proc/new_player_panel_proc()
|
||||
var/output = "<div align='center'><B>New Player Options</B>"
|
||||
output +="<hr>"
|
||||
output += "<p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
|
||||
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
|
||||
|
||||
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
|
||||
if(!ready) output += "<p><a href='byond://?src=\ref[src];ready=1'>Declare Ready</A></p>"
|
||||
@@ -57,9 +55,9 @@
|
||||
else
|
||||
output += "<p><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A></p>"
|
||||
|
||||
output += "</div>"
|
||||
output += "</center>"
|
||||
|
||||
var/datum/browser/popup = new(src, "playersetup", "<div align='center'>New Player Options</div>", 210, 240)
|
||||
var/datum/browser/popup = new(src, "playersetup", "<div align='center'>New Player Options</div>", 220, 290)
|
||||
popup.set_window_options("can_close=0")
|
||||
popup.set_content(output)
|
||||
popup.open(0)
|
||||
@@ -105,6 +103,7 @@
|
||||
|
||||
if(href_list["ready"])
|
||||
ready = !ready
|
||||
new_player_panel_proc()
|
||||
|
||||
if(href_list["refresh"])
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
@@ -115,7 +114,7 @@
|
||||
if(alert(src,"Are you sure you wish to observe? You will have to wait 30 minutes before being able to respawn!","Player Setup","Yes","No") == "Yes")
|
||||
if(!client) return 1
|
||||
var/mob/dead/observer/observer = new()
|
||||
|
||||
src << browse(null, "window=playersetup")
|
||||
spawning = 1
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
|
||||
@@ -309,7 +308,7 @@
|
||||
EquipRacialItems(character)
|
||||
character = job_master.EquipRank(character, rank, 1) //equips the human
|
||||
EquipCustomItems(character)
|
||||
|
||||
|
||||
// AIs don't need a spawnpoint, they must spawn at an empty core
|
||||
if(character.mind.assigned_role == "AI")
|
||||
|
||||
@@ -346,7 +345,7 @@
|
||||
else
|
||||
character.loc = pick(latejoin)
|
||||
join_message = "has arrived on the station"
|
||||
|
||||
|
||||
character.lastarea = get_area(loc)
|
||||
// Moving wheelchair if they have one
|
||||
if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
|
||||
@@ -398,12 +397,12 @@
|
||||
if(character.mind)
|
||||
if((character.mind.special_role != "MODE"))
|
||||
var/arrivalmessage = "A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"]."
|
||||
announcer.say(";[arrivalmessage]")
|
||||
announcer.say(";[arrivalmessage]")
|
||||
else
|
||||
if(character.mind)
|
||||
if((character.mind.special_role != "MODE"))
|
||||
// can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc.
|
||||
global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
|
||||
global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
|
||||
|
||||
proc/LateChoices()
|
||||
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
|
||||
@@ -444,9 +443,9 @@
|
||||
proc/create_character()
|
||||
spawning = 1
|
||||
close_spawn_windows()
|
||||
|
||||
|
||||
var/mob/living/carbon/human/new_character
|
||||
|
||||
|
||||
var/datum/species/chosen_species
|
||||
if(client.prefs.species)
|
||||
chosen_species = all_species[client.prefs.species]
|
||||
@@ -454,10 +453,10 @@
|
||||
// Have to recheck admin due to no usr at roundstart. Latejoins are fine though.
|
||||
if(is_species_whitelisted(chosen_species) || has_admin_rights())
|
||||
new_character = new(loc, client.prefs.species)
|
||||
|
||||
|
||||
if(!new_character)
|
||||
new_character = new(loc)
|
||||
|
||||
|
||||
new_character.lastarea = get_area(loc)
|
||||
|
||||
var/datum/language/chosen_language
|
||||
@@ -505,9 +504,9 @@
|
||||
if(client.prefs.disabilities & DISABILITY_FLAG_DEAF)
|
||||
new_character.dna.SetSEState(DEAFBLOCK,1,1)
|
||||
new_character.sdisabilities |= DEAF
|
||||
|
||||
|
||||
chosen_species.handle_dna(new_character)
|
||||
|
||||
|
||||
domutcheck(new_character)
|
||||
new_character.dna.UpdateSE()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user