Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into turfs

# Conflicts:
#	code/modules/mob/living/simple_animal/friendly/farm_animals.dm
#	paradise.dme
This commit is contained in:
Mark van Alphen
2019-04-17 22:46:43 +02:00
78 changed files with 905 additions and 595 deletions
+5
View File
@@ -70,6 +70,11 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
if(banned_mob.client)
computerid = banned_mob.client.computer_id
ip = banned_mob.client.address
else
if(banned_mob.lastKnownIP)
ip = banned_mob.lastKnownIP
if(banned_mob.computer_id)
computerid = banned_mob.computer_id
else if(banckey)
ckey = ckey(banckey)
computerid = bancid
+1
View File
@@ -107,6 +107,7 @@ var/list/admin_verbs_event = list(
/client/proc/toggle_random_events,
/client/proc/toggle_random_events,
/client/proc/toggle_ert_calling,
/client/proc/show_tip,
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_custom_event_info,
/client/proc/cmd_view_custom_event_info,
+4 -12
View File
@@ -1005,15 +1005,7 @@
var/reason = input(usr,"Please state the reason","Reason") as message|null
if(!reason)
return
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
if("Cancel")
return
if("Yes")
M = admin_ban_mobsearch(M, ban_ckey_param, usr)
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
if("No")
M = admin_ban_mobsearch(M, ban_ckey_param, usr)
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
to_chat(M, "<span class='warning'><BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG></span>")
to_chat(M, "<span class='warning'>This is a permanent ban.</span>")
if(config.banappeals)
@@ -1553,12 +1545,12 @@
else if(href_list["take_question"])
var/index = text2num(href_list["take_question"])
if(href_list["is_mhelp"])
SSmentor_tickets.takeTicket(index)
else //Ahelp
SStickets.takeTicket(index)
else if(href_list["cult_nextobj"])
if(alert(usr, "Validate the current Cult objective and unlock the next one?", "Cult Cheat Code", "Yes", "No") != "Yes")
return
@@ -1886,7 +1878,7 @@
var/logmsg = null
switch(punishment)
if("Lightning bolt")
M.electrocute_act(5, "Lightning Bolt", safety=1)
M.electrocute_act(5, "Lightning Bolt", safety = TRUE, override = TRUE)
playsound(get_turf(M), 'sound/magic/lightningshock.ogg', 50, 1, -1)
M.adjustFireLoss(75)
M.Weaken(5)
+25
View File
@@ -1020,6 +1020,31 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("Admin [key_name(src)] has disabled ERT calling.")
message_admins("Admin [key_name_admin(usr)] has disabled ERT calling.", 1)
/client/proc/show_tip()
set category = "Admin"
set name = "Show Custom Tip"
set desc = "Sends a tip (that you specify) to all players. After all \
you're the experienced player here."
if(!check_rights(R_ADMIN))
return
var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
if(!input)
return
if(!ticker)
return
ticker.selected_tip = input
// If we've already tipped, then send it straight away.
if(ticker.tipped)
ticker.send_tip_of_the_round()
message_admins("[key_name_admin(usr)] sent a Tip of the round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
/client/proc/modify_goals()
set category = "Event"
set name = "Modify Station Goals"
+3 -3
View File
@@ -234,14 +234,14 @@
/datum/plant_gene/trait/cell_charge/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C)
var/power = G.seed.potency*rate
if(prob(power))
C.electrocute_act(round(power), G, 1, 1)
C.electrocute_act(round(power), G, 1, TRUE)
/datum/plant_gene/trait/cell_charge/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
if(iscarbon(target))
if(isliving(target))
var/mob/living/carbon/C = target
var/power = G.seed.potency*rate
if(prob(power))
C.electrocute_act(round(power), G, 1, 1)
C.electrocute_act(round(power), G, 1, TRUE)
/datum/plant_gene/trait/cell_charge/on_consume(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
if(!G.reagents.total_volume)
+23 -18
View File
@@ -134,43 +134,48 @@
M.forceMove(get_turf(src))
visible_message("<span class='danger'>[M] bursts out of [src]!</span>")
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, override = 0, tesla_shock = 0)
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage)
if(status_flags & GODMODE) //godmode
return 0
return FALSE
if(NO_SHOCK in mutations) //shockproof
return 0
return FALSE
if(tesla_shock && tesla_ignore)
return FALSE
shock_damage *= siemens_coeff
if(shock_damage<1 && !override)
return 0
if(dna && dna.species)
shock_damage *= dna.species.siemens_coeff
if(shock_damage < 1 && !override)
return FALSE
if(reagents.has_reagent("teslium"))
shock_damage *= 1.5 //If the mob has teslium in their body, shocks are 50% more damaging!
take_overall_damage(0,shock_damage, TRUE, used_weapon = "Electrocution")
shock_internal_organs(shock_damage)
if(illusion)
adjustStaminaLoss(shock_damage)
else
take_overall_damage(0, shock_damage, TRUE, used_weapon = "Electrocution")
shock_internal_organs(shock_damage)
visible_message(
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
"<span class='italics'>You hear a heavy electrical crack.</span>" \
)
"<span class='danger'>[src] was shocked by \the [source]!</span>",
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>",
"<span class='italics'>You hear a heavy electrical crack.</span>")
AdjustJitter(1000) //High numbers for violent convulsions
do_jitter_animation(jitteriness)
AdjustStuttering(2)
if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5))
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
Stun(2)
spawn(20)
AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5))
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
Stun(3)
Weaken(3)
if(shock_damage > 200)
src.visible_message(
"<span class='danger'>[src] was arc flashed by the [source]!</span>", \
"<span class='userdanger'>The [source] arc flashes and electrocutes you!</span>", \
"<span class='italics'>You hear a lightning-like crack!</span>" \
)
"<span class='danger'>[src] was arc flashed by the [source]!</span>",
"<span class='userdanger'>The [source] arc flashes and electrocutes you!</span>",
"<span class='italics'>You hear a lightning-like crack!</span>")
playsound(loc, 'sound/effects/eleczap.ogg', 50, 1, -1)
explosion(src.loc,-1,0,2,2)
explosion(loc, -1, 0, 2, 2)
if(override)
return override
else
+6 -13
View File
@@ -551,13 +551,8 @@
dna.species.update_sight(src)
//Removed the horrible safety parameter. It was only being used by ninja code anyways.
//Now checks siemens_coefficient of the affected area by default
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0)
if(status_flags & GODMODE) //godmode
return 0
if(NO_SHOCK in mutations) //shockproof
return 0
//Added a safety check in case you want to shock a human mob directly through electrocute_act.
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
if(tesla_shock)
var/total_coeff = 1
if(gloves)
@@ -575,20 +570,18 @@
siemens_coeff = 0
else if(!safety)
var/gloves_siemens_coeff = 1
var/species_siemens_coeff = 1
if(gloves)
var/obj/item/clothing/gloves/G = gloves
gloves_siemens_coeff = G.siemens_coefficient
if(dna.species)
species_siemens_coeff = dna.species.siemens_coeff
siemens_coeff = gloves_siemens_coeff * species_siemens_coeff
if(undergoing_cardiac_arrest())
siemens_coeff = gloves_siemens_coeff
if(undergoing_cardiac_arrest() && !illusion)
if(shock_damage * siemens_coeff >= 1 && prob(25))
set_heartattack(FALSE)
if(stat == CONSCIOUS)
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")
. = ..()
dna.species.spec_electrocute_act(src, shock_damage, source, siemens_coeff, safety, override, tesla_shock, illusion, stun)
. = ..(shock_damage, source, siemens_coeff, safety, override, tesla_shock, illusion, stun)
/mob/living/carbon/human/Topic(href, href_list)
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
@@ -309,6 +309,9 @@
/datum/species/proc/handle_death(mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
return
/datum/species/proc/spec_electrocute_act(mob/living/carbon/human/H, shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
return
/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(attacker_style && attacker_style.help_act(user, target))//adminfu only...
return TRUE
@@ -521,6 +524,7 @@
miss_sound = 'sound/weapons/slashmiss.ogg'
sharp = TRUE
animation_type = ATTACK_EFFECT_CLAW
var/has_been_sharpened = FALSE
/datum/unarmed_attack/bite
attack_verb = list("chomp")
@@ -31,7 +31,7 @@
eyes = "vox_eyes_s"
species_traits = list(NO_SCAN, IS_WHITELISTED, NOTRANSSTING)
clothing_flags = HAS_SOCKS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS //Species-fitted 'em all.
dietflags = DIET_OMNI
bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS
@@ -173,9 +173,9 @@
eyes = "blank_eyes"
species_traits = list(NO_SCAN, NO_BLOOD, NO_PAIN, IS_WHITELISTED)
dies_at_threshold = TRUE
clothing_flags = 0 //IDK if you've ever seen underwear on an Armalis, but it ain't pretty.
bodyflags = HAS_TAIL
dietflags = DIET_OMNI //should inherit this from vox, this is here just in case
dies_at_threshold = TRUE
blood_color = "#2299FC"
flesh_color = "#808D11"
@@ -254,17 +254,20 @@ var/global/list/damage_icon_parts = list()
if(underwear && dna.species.clothing_flags & HAS_UNDERWEAR)
var/datum/sprite_accessory/underwear/U = GLOB.underwear_list[underwear]
if(U)
underwear_standing.Blend(new /icon(U.icon, "uw_[U.icon_state]_s"), ICON_OVERLAY)
var/u_icon = U.sprite_sheets && (dna.species.name in U.sprite_sheets) ? U.sprite_sheets[dna.species.name] : U.icon //Species-fit the undergarment.
underwear_standing.Blend(new /icon(u_icon, "uw_[U.icon_state]_s"), ICON_OVERLAY)
if(undershirt && dna.species.clothing_flags & HAS_UNDERSHIRT)
var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_list[undershirt]
if(U2)
underwear_standing.Blend(new /icon(U2.icon, "us_[U2.icon_state]_s"), ICON_OVERLAY)
var/u2_icon = U2.sprite_sheets && (dna.species.name in U2.sprite_sheets) ? U2.sprite_sheets[dna.species.name] : U2.icon
underwear_standing.Blend(new /icon(u2_icon, "us_[U2.icon_state]_s"), ICON_OVERLAY)
if(socks && dna.species.clothing_flags & HAS_SOCKS)
var/datum/sprite_accessory/socks/U3 = GLOB.socks_list[socks]
if(U3)
underwear_standing.Blend(new /icon(U3.icon, "sk_[U3.icon_state]_s"), ICON_OVERLAY)
var/u3_icon = U3.sprite_sheets && (dna.species.name in U3.sprite_sheets) ? U3.sprite_sheets[dna.species.name] : U3.icon
underwear_standing.Blend(new /icon(u3_icon, "sk_[U3.icon_state]_s"), ICON_OVERLAY)
if(underwear_standing)
overlays_standing[UNDERWEAR_LAYER] = mutable_appearance(underwear_standing, layer = -UNDERWEAR_LAYER)
+16 -2
View File
@@ -55,8 +55,22 @@
/mob/living/proc/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
return 0
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0)
return 0 //only carbon liveforms have this proc
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage)
if(status_flags & GODMODE) //godmode
return FALSE
if(NO_SHOCK in mutations) //shockproof
return FALSE
if(tesla_shock && tesla_ignore)
return FALSE
if(shock_damage > 0)
if(!illusion)
adjustFireLoss(shock_damage)
visible_message(
"<span class='danger'>[src] was shocked by \the [source]!</span>",
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>",
"<span class='italics'>You hear a heavy electrical crack.</span>")
return shock_damage
/mob/living/emp_act(severity)
var/list/L = src.get_contents()
@@ -71,6 +71,9 @@
/mob/living/silicon/drop_item()
return
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
return FALSE //So borgs they don't die trying to fix wiring
/mob/living/silicon/emp_act(severity)
switch(severity)
if(1)
@@ -85,6 +85,9 @@
/mob/living/simple_animal/hostile/construct/narsie_act()
return
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
return FALSE
/////////////////Juggernaut///////////////
@@ -40,14 +40,6 @@
/mob/living/simple_animal/hostile/retaliate/goat/handle_automated_movement()
..()
if(!pulledby)
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
var/step = get_step(src, direction)
if(step)
if(locate(/obj/structure/spacevine) in step)
Move(step, get_dir(src, step))
/mob/living/simple_animal/hostile/retaliate/goat/handle_automated_action()
//chance to go crazy and start wacking stuff
if(!enemies.len && prob(1))
Retaliate()
@@ -55,11 +47,16 @@
if(enemies.len && prob(10))
enemies = list()
LoseTarget()
src.visible_message("<span class='notice'>[src] calms down.</span>")
visible_message("<span class='notice'>[src] calms down.</span>")
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
if(SV)
SV.eat(src)
if(stat == CONSCIOUS)
eat_plants()
if(!pulledby)
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
var/step = get_step(src, direction)
if(step)
if(locate(/obj/structure/spacevine) in step || locate(/obj/structure/glowshroom) in step)
Move(step, get_dir(src, step))
/mob/living/simple_animal/hostile/retaliate/goat/Life(seconds, times_fired)
. = ..()
@@ -68,14 +65,12 @@
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
..()
src.visible_message("<span class='warning'>[src] gets an evil-looking gleam in their eye.</span>")
visible_message("<span class='danger'>[src] gets an evil-looking gleam in their eye.</span>")
/mob/living/simple_animal/hostile/retaliate/goat/Move()
..()
. = ..()
if(!stat)
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
if(SV)
SV.eat(src)
eat_plants()
/mob/living/simple_animal/hostile/retaliate/goat/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(stat == CONSCIOUS && istype(O, /obj/item/reagent_containers/glass))
@@ -83,6 +78,29 @@
else
return ..()
/mob/living/simple_animal/hostile/retaliate/goat/proc/eat_plants()
var/eaten = FALSE
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
if(SV)
SV.eat(src)
eaten = TRUE
var/obj/structure/glowshroom/GS = locate(/obj/structure/glowshroom) in loc
if(GS)
qdel(GS)
eaten = TRUE
if(eaten && prob(10))
say("Nom")
/mob/living/simple_animal/hostile/retaliate/goat/AttackingTarget()
..()
if(isdiona(target))
var/mob/living/carbon/human/H = target
var/obj/item/organ/external/NB = pick(H.bodyparts)
H.visible_message("<span class='warning'>[src] takes a big chomp out of [H]!</span>", "<span class='userdanger'>[src] takes a big chomp out of your [NB.name]!</span>")
NB.droplimb()
//cow
/mob/living/simple_animal/cow
name = "cow"
@@ -142,7 +142,7 @@
return
/mob/living/simple_animal/hostile/floor_cluwne/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)//prevents runtimes with machine fuckery
/mob/living/simple_animal/hostile/floor_cluwne/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE) //prevents runtimes with machine fuckery
return FALSE
@@ -1,129 +0,0 @@
/mob/living/simple_animal/pony
name = "\improper pony"
desc = "A bound spirit"
icon = 'icons/mob/pony.dmi'
// icon_dead = "shade_dead"
maxHealth = 50
health = 50
speak_emote = list("whinnys")
emote_hear = list("excitedly says")
response_help = "pets"
response_disarm = "pushes"
response_harm = "kicks"
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "sends rainbows of power to"
minbodytemp = 0
maxbodytemp = 4000
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
speed = 0
stop_automated_movement = 0
status_flags = 0
faction = list("pony")
status_flags = CANPUSH
universal_speak = 1
/mob/living/simple_animal/pony/Life()
..()
if(stat == 2)
new /obj/item/reagent_containers/food/snacks/ectoplasm(src.loc)
src.visible_message("<span class='warning'>[src] lets out a contented sigh as [p_their()] form unwinds.</span>")
src.ghostize()
qdel(src)
return
/mob/living/simple_animal/pony/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/soulstone))
O.transfer_soul("SHADE", src, user)
else
..()
/mob/living/simple_animal/pony/twilight
name = "Twilight Sparkle"
real_name = "Twilight Sparkle"
icon_state = "twilight"
icon_living = "twilight"
/mob/living/simple_animal/pony/pinkie
name = "Pinkie Pie"
real_name = "Pinkie Pie"
icon_state = "pinkie"
icon_living = "pinkie"
/mob/living/simple_animal/pony/rainbow
name = "Rainbow Dash"
real_name = "Rainbow Dash"
icon_state = "rainbow"
icon_living = "rainbow"
mob/living/simple_animal/pony/fluttershy
name = "Fluttershy"
real_name = "Fluttershy"
icon_state = "fluttershy"
icon_living = "fluttershy"
mob/living/simple_animal/pony/applejack
name = "Applejack"
real_name = "Applejack"
icon_state = "applejack"
icon_living = "applejack"
mob/living/simple_animal/pony/luna
name = "Luna"
real_name = "Luna"
icon_state = "luna"
icon_living = "luna"
mob/living/simple_animal/pony/clownie
name = "Clownie"
real_name = "Clownie"
icon_state = "clownie"
icon_living = "clownie"
mob/living/simple_animal/pony/tia
name = "Tia"
real_name = "Tia"
icon_state = "tia"
icon_living = "tia"
mob/living/simple_animal/pony/trixie
name = "Trixie"
real_name = "Trixie"
icon_state = "trixie_a_full"
icon_living = "trixing_a_full"
mob/living/simple_animal/pony/lyra
name = "Lyra"
real_name = "Lyra"
icon_state = "lyra"
icon_living = "lyra"
mob/living/simple_animal/pony/vinyl
name = "Vinyl"
real_name = "Vinyl"
icon_state = "vinyl"
icon_living = "vinyl"
mob/living/simple_animal/pony/rarity
name = "Rarity"
real_name = "Rarity"
icon_state = "rarity"
icon_living = "rarity"
mob/living/simple_animal/pony/whooves
name = "Whooves"
real_name = "Whooves"
icon_state = "whooves"
icon_living = "whooves"
mob/living/simple_animal/pony/fleur
name = "Fleur"
real_name = "Fleur"
icon_state = "fleur"
icon_living = "fleur"
mob/living/simple_animal/pony/mac
name = "Mac"
real_name = "Mac"
icon_state = "mac"
icon_living = "mac"
@@ -385,19 +385,22 @@
if(underwear && (current_species.clothing_flags & HAS_UNDERWEAR))
var/datum/sprite_accessory/underwear/U = GLOB.underwear_list[underwear]
if(U)
underwear_s = new/icon(U.icon, "uw_[U.icon_state]_s", ICON_OVERLAY)
var/u_icon = U.sprite_sheets && (current_species.name in U.sprite_sheets) ? U.sprite_sheets[current_species.name] : U.icon //Species-fit the undergarment.
underwear_s = new/icon(u_icon, "uw_[U.icon_state]_s", ICON_OVERLAY)
var/icon/undershirt_s = null
if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT))
var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_list[undershirt]
if(U2)
undershirt_s = new/icon(U2.icon, "us_[U2.icon_state]_s", ICON_OVERLAY)
var/u2_icon = U2.sprite_sheets && (current_species.name in U2.sprite_sheets) ? U2.sprite_sheets[current_species.name] : U2.icon
undershirt_s = new/icon(u2_icon, "us_[U2.icon_state]_s", ICON_OVERLAY)
var/icon/socks_s = null
if(socks && (current_species.clothing_flags & HAS_SOCKS))
var/datum/sprite_accessory/socks/U3 = GLOB.socks_list[socks]
if(U3)
socks_s = new/icon(U3.icon, "sk_[U3.icon_state]_s", ICON_OVERLAY)
var/u3_icon = U3.sprite_sheets && (current_species.name in U3.sprite_sheets) ? U3.sprite_sheets[current_species.name] : U3.icon
socks_s = new/icon(u3_icon, "sk_[U3.icon_state]_s", ICON_OVERLAY)
var/icon/clothes_s = null
var/uniform_dmi='icons/mob/uniform.dmi'
@@ -49,6 +49,7 @@
// Restrict some styles to specific species
var/list/species_allowed = list("Human", "Slime People")
var/list/sprite_sheets = list() //For accessories common across species but need to use 'fitted' sprites (like underwear). e.g. list("Vox" = 'icons/mob/species/vox/iconfile.dmi')
var/list/models_allowed = list() //Specifies which, if any, hairstyles or markings can be accessed by which prosthetics. Should equal the manufacturing company name in robolimbs.dm.
var/list/heads_allowed = null //Specifies which, if any, alt heads a head marking, hairstyle or facial hair style is compatible with.
var/list/tails_allowed = null //Specifies which, if any, tails a tail marking is compatible with.
@@ -132,7 +133,7 @@
/datum/sprite_accessory/skin/human
name = "Default human skin"
icon_state = "default"
species_allowed = list("Human",)
species_allowed = list("Human")
/datum/sprite_accessory/skin/human/human_tatt01
name = "Tatt01 human skin"
@@ -167,7 +168,8 @@
///////////////////////////
/datum/sprite_accessory/underwear
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skrell", "Slime People", "Skeleton", "Drask")
species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skrell", "Slime People", "Skeleton", "Drask", "Vox")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/underwear.dmi')
gender = NEUTER
/datum/sprite_accessory/underwear/nude
@@ -293,7 +295,8 @@
////////////////////////////
/datum/sprite_accessory/undershirt
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skrell", "Slime People", "Skeleton", "Drask")
species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skrell", "Slime People", "Skeleton", "Drask", "Vox")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/underwear.dmi')
gender = NEUTER
/datum/sprite_accessory/undershirt/nude
@@ -529,7 +532,8 @@
///////////////////////
/datum/sprite_accessory/socks
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skrell", "Slime People", "Skeleton", "Drask")
species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skrell", "Slime People", "Skeleton", "Drask", "Vox")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/underwear.dmi')
gender = NEUTER
/datum/sprite_accessory/socks/nude
@@ -566,6 +570,10 @@
icon_state = "thin_knee"
gender = FEMALE
/datum/sprite_accessory/socks/striped_norm
name = "Normal Striped"
icon_state = "striped_norm"
/datum/sprite_accessory/socks/striped_knee
name = "Knee-high Striped"
icon_state = "striped_knee"
@@ -603,50 +611,3 @@
/datum/sprite_accessory/socks/black_fishnet
name = "Black Fishnet"
icon_state = "black_fishnet"
/datum/sprite_accessory/socks/vox
species_allowed = list("Vox")
/datum/sprite_accessory/socks/vox/vox_white
name = "Vox White"
icon_state = "vox_white"
/datum/sprite_accessory/socks/vox/vox_black
name = "Vox Black"
icon_state = "vox_black"
/datum/sprite_accessory/socks/vox/vox_thin
name = "Vox Black Thin"
icon_state = "vox_blackthin"
/datum/sprite_accessory/socks/vox/vox_rainbow
name = "Vox Rainbow"
icon_state = "vox_rainbow"
/datum/sprite_accessory/socks/vox/vox_stripped
name = "Vox Striped"
icon_state = "vox_white"
/datum/sprite_accessory/socks/vox/vox_white_thigh
name = "Vox Thigh-high White"
icon_state = "vox_whiteTH"
/datum/sprite_accessory/socks/vox/vox_black_thigh
name = "Vox Thigh-high Black"
icon_state = "vox_blackTH"
/datum/sprite_accessory/socks/vox/vox_thin_thigh
name = "Vox Thigh-high Thin"
icon_state = "vox_blackthinTH"
/datum/sprite_accessory/socks/vox/vox_rainbow_thigh
name = "Vox Thigh-high Rainbow"
icon_state = "vox_rainbowTH"
/datum/sprite_accessory/socks/vox/vox_striped_thigh
name = "Vox Thigh-high Striped"
icon_state = "vox_stripedTH"
/datum/sprite_accessory/socks/vox/vox_fishnet
name = "Vox Fishnets"
icon_state = "vox_fishnet"
-2
View File
@@ -289,8 +289,6 @@
return 1
if(ispath(MP, /mob/living/simple_animal/parrot))
return 1
if(ispath(MP, /mob/living/simple_animal/pony))
return 1
if(!GAMEMODE_IS_NUCLEAR)
if(ispath(MP, /mob/living/simple_animal/pet/fox/Syndifox))
return 0
+8 -7
View File
@@ -49,6 +49,7 @@
anchored = 1
use_power = NO_POWER_USE
req_access = list(access_engine_equip)
siemens_strength = 1
var/spooky=0
var/area/area
var/areastring = null
@@ -538,7 +539,7 @@
if(C.amount >= 10 && !terminal && opened && has_electronics != 2)
var/turf/T = get_turf(src)
var/obj/structure/cable/N = T.get_cable_node()
if(prob(50) && electrocute_mob(usr, N, N))
if(prob(50) && electrocute_mob(usr, N, N, 1, TRUE))
do_sparks(5, 1, src)
return
C.use(10)
@@ -1240,13 +1241,13 @@
if(prob(5))
var/list/shock_mobs = list()
for(var/C in view(get_turf(src), 5)) //We only want to shock a single random mob in range, not every one.
if(iscarbon(C))
shock_mobs +=C
if(isliving(C))
shock_mobs += C
if(shock_mobs.len)
var/mob/living/carbon/S = pick(shock_mobs)
S.electrocute_act(rand(5,25), "electrical arc")
playsound(get_turf(S), 'sound/effects/eleczap.ogg', 75, 1)
Beam(S,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5)
var/mob/living/L = pick(shock_mobs)
L.electrocute_act(rand(5, 25), "electrical arc")
playsound(get_turf(L), 'sound/effects/eleczap.ogg', 75, 1)
Beam(L, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5)
else // no cell, switch everything off
+4 -4
View File
@@ -187,14 +187,14 @@ By design, d1 is the smallest direction and d2 is the highest
src.add_fingerprint(user)
// shock the user with probability prb
/obj/structure/cable/proc/shock(mob/user, prb, var/siemens_coeff = 1.0)
/obj/structure/cable/proc/shock(mob/user, prb, siemens_coeff = 1)
if(!prob(prb))
return 0
return FALSE
if(electrocute_mob(user, powernet, src, siemens_coeff))
do_sparks(5, 1, src)
return 1
return TRUE
else
return 0
return FALSE
//explosion handling
/obj/structure/cable/ex_act(severity)
+4 -17
View File
@@ -162,23 +162,10 @@
ex_act(EXPLODE_DEVASTATE)
/obj/item/stock_parts/cell/proc/get_electrocute_damage()
switch(charge)
if(5000000 to INFINITY)
return min(rand(200, 300),rand(200, 300))
if(4000000 to 5000000 - 1)
return min(rand(80, 180),rand(80, 180))
if(1000000 to 4000000 - 1)
return min(rand(50, 160),rand(50, 160))
if(200000 to 1000000 - 1)
return min(rand(25, 80),rand(25, 80))
if(100000 to 200000 - 1)//Ave powernet
return min(rand(20, 60),rand(20, 60))
if(50000 to 100000 - 1)
return min(rand(15, 40),rand(15, 40))
if(1000 to 50000 - 1)
return min(rand(10, 20),rand(10, 20))
else
return 0
if(charge >= 1000)
return Clamp(20 + round(charge / 25000), 20, 195) + rand(-5, 5)
else
return 0
// Cell variants
/obj/item/stock_parts/cell/empty/New()
+2 -2
View File
@@ -353,7 +353,7 @@
M.show_message("[user.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
if(on && (W.flags & CONDUCT))
if(prob(12))
electrocute_mob(user, get_area(src), src, 0.3)
electrocute_mob(user, get_area(src), src, 0.3, TRUE)
broken()
else
@@ -387,7 +387,7 @@
if(has_power() && (W.flags & CONDUCT))
do_sparks(3, 1, src)
if(prob(75))
electrocute_mob(user, get_area(src), src, rand(0.7,1.0))
electrocute_mob(user, get_area(src), src, rand(0.7, 1), TRUE)
// returns whether this light has power
+12 -9
View File
@@ -298,34 +298,37 @@
//power_source is a source of electricity, can be powercell, area, apc, cable, powernet or null
//source is an object caused electrocuting (airlock, grille, etc)
//No animations will be performed by this proc.
/proc/electrocute_mob(mob/living/carbon/M as mob, var/power_source, var/obj/source, var/siemens_coeff = 1.0)
/proc/electrocute_mob(mob/living/M, power_source, obj/source, siemens_coeff = 1, dist_check = FALSE)
if(!istype(M))
return 0
return FALSE
if(istype(M.loc,/obj/mecha))
return 0 //feckin mechs are dumb
return FALSE //feckin mechs are dumb
if(dist_check)
if(!in_range(source, M))
return FALSE
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.siemens_coefficient == 0)
return 0 //to avoid spamming with insulated glvoes on
return FALSE //to avoid spamming with insulated glvoes on
var/area/source_area
if(istype(power_source,/area))
if(istype(power_source, /area))
source_area = power_source
power_source = source_area.get_apc()
if(istype(power_source,/obj/structure/cable))
if(istype(power_source, /obj/structure/cable))
var/obj/structure/cable/Cable = power_source
power_source = Cable.powernet
var/datum/powernet/PN
var/obj/item/stock_parts/cell/cell
if(istype(power_source,/datum/powernet))
if(istype(power_source, /datum/powernet))
PN = power_source
else if(istype(power_source,/obj/item/stock_parts/cell))
cell = power_source
else if(istype(power_source,/obj/machinery/power/apc))
else if(istype(power_source, /obj/machinery/power/apc))
var/obj/machinery/power/apc/apc = power_source
cell = apc.cell
if(apc.terminal)
@@ -344,7 +347,7 @@
if(cell)
cell_damage = cell.get_electrocute_damage()
var/shock_damage = 0
if(PN_damage>=cell_damage)
if(PN_damage >= cell_damage)
power_source = PN
shock_damage = PN_damage
else
+4 -17
View File
@@ -128,23 +128,10 @@
newavail = 0
/datum/powernet/proc/get_electrocute_damage()
switch(avail)
if(5000000 to INFINITY)
return min(rand(200,300),rand(200,300))
if(4000000 to 5000000)
return min(rand(80,180),rand(80,180))
if(1000000 to 4000000)
return min(rand(50,160),rand(50,160))
if(200000 to 1000000)
return min(rand(25,80),rand(25,80))
if(100000 to 200000)//Ave powernet
return min(rand(20,60),rand(20,60))
if(50000 to 100000)
return min(rand(15,40),rand(15,40))
if(1000 to 50000)
return min(rand(10,20),rand(10,20))
else
return 0
if(avail >= 1000)
return Clamp(20 + round(avail / 25000), 20, 195) + rand(-5, 5)
else
return 0
////////////////////////////////////////////////
// Misc.
@@ -78,7 +78,7 @@
if(isliving(user))
var/shock_damage = min(rand(30,40),rand(30,40))
if(iscarbon(user))
if(isliving(user) && !issilicon(user))
var/stun = min(shock_damage, 15)
user.Stun(stun)
user.Weaken(10)
+2 -2
View File
@@ -183,7 +183,7 @@
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed, target = src))
if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky
if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal, 1, TRUE)) //animate the electrocution if uncautious and unlucky
do_sparks(5, 1, src)
return
@@ -320,7 +320,7 @@
if(do_after(user, 50, target = src))
var/turf/T = get_turf(user)
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
if(prob(50) && electrocute_mob(user, N, N)) //animate the electrocution if uncautious and unlucky
if(prob(50) && electrocute_mob(usr, N, N, 1, TRUE)) //animate the electrocution if uncautious and unlucky
do_sparks(5, 1, src)
return
+18 -2
View File
@@ -115,6 +115,16 @@
/obj/singularity/energy_ball/Bumped(atom/A)
dust_mobs(A)
/obj/singularity/energy_ball/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
to_chat(C, "<span class='userdanger'>That was a shockingly dumb idea.</span>")
var/obj/item/organ/internal/brain/B = C.get_int_organ(/obj/item/organ/internal/brain)
C.ghostize(0)
if(B)
B.remove(C)
qdel(B)
/obj/singularity/energy_ball/orbit(obj/singularity/energy_ball/target)
if(istype(target))
target.orbiting_balls += src
@@ -130,6 +140,10 @@
qdel(src)
/obj/singularity/energy_ball/proc/dust_mobs(atom/A)
if(isliving(A))
var/mob/living/L = A
if(L.incorporeal_move || L.status_flags & GODMODE)
return
if(!iscarbon(A))
return
for(var/obj/machinery/power/grounding_rod/GR in orange(src, 2))
@@ -155,7 +169,6 @@
var/static/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
/obj/machinery/power/emitter,
/obj/machinery/field/generator,
/mob/living/simple_animal,
/obj/machinery/particle_accelerator/control_box,
/obj/structure/particle_accelerator/fuel_chamber,
/obj/structure/particle_accelerator/particle_emitter/center,
@@ -165,6 +178,9 @@
/obj/structure/particle_accelerator/end_cap,
/obj/machinery/field/containment,
/obj/structure/disposalpipe,
/obj/structure/disposaloutlet,
/obj/machinery/disposal/deliveryChute,
/obj/machinery/camera,
/obj/structure/sign,
/obj/machinery/gateway,
/obj/structure/grille,
@@ -255,7 +271,7 @@
else if(closest_mob)
var/shock_damage = Clamp(round(power/400), 10, 90) + rand(-5, 5)
closest_mob.electrocute_act(shock_damage, source, 1, tesla_shock = 1)
closest_mob.electrocute_act(shock_damage, source, 1, tesla_shock = TRUE)
if(issilicon(closest_mob))
var/mob/living/silicon/S = closest_mob
if(stun_mobs)
@@ -342,7 +342,11 @@
if(method == TOUCH)
M.ExtinguishMob()
/datum/reagent/cryostylane/reaction_turf(turf/T, volume)
/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, volume)
if(!istype(T))
return
if(volume >= 3)
T.MakeSlippery(TURF_WET_ICE)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(15,30))
@@ -1171,6 +1171,6 @@
shock_timer++
if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
shock_timer = 0
M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you
M.electrocute_act(rand(5, 20), "Teslium in their body", 1, TRUE) //Override because it's caused from INSIDE of you
playsound(M, "sparks", 50, 1)
return ..()
@@ -376,9 +376,9 @@
/datum/chemical_reaction/shock_explosion/on_reaction(datum/reagents/holder, created_volume)
var/turf/T = get_turf(holder.my_atom)
for(var/mob/living/carbon/C in view(min(8, round(created_volume * 2)), T))
C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results.
C.electrocute_act(3.5, "electrical blast")
for(var/mob/living/L in view(min(8, round(created_volume * 2)), T))
L.Beam(T, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results.
L.electrocute_act(3.5, "electrical blast")
holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched.
holder.del_reagent("uranium")