mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
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:
@@ -34,12 +34,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/highcap
|
||||
name = "High capacity gas pump"
|
||||
desc = "A high capacity pump"
|
||||
|
||||
target_pressure = 15000000
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/on
|
||||
icon_state = "map_on"
|
||||
on = 1
|
||||
|
||||
@@ -66,8 +66,6 @@
|
||||
|
||||
air.temperature = temperature
|
||||
|
||||
update_visuals()
|
||||
|
||||
/turf/simulated/Destroy()
|
||||
visibilityChanged()
|
||||
QDEL_NULL(active_hotspot)
|
||||
@@ -209,6 +207,8 @@
|
||||
|
||||
air.react()
|
||||
|
||||
update_visuals()
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
hotspot_expose(air.temperature, CELL_VOLUME)
|
||||
for(var/atom/movable/item in src)
|
||||
@@ -219,13 +219,6 @@
|
||||
if(consider_superconductivity(starting = 1))
|
||||
remove = 0
|
||||
|
||||
if(air.temperature < T0C && air.return_pressure() > 10)
|
||||
icy = 1
|
||||
else if(air.temperature > T0C)
|
||||
icy = 0
|
||||
|
||||
update_visuals()
|
||||
|
||||
if(!excited_group && remove == 1)
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
@@ -237,27 +230,19 @@
|
||||
archived_cycle = SSair.times_fired
|
||||
|
||||
/turf/simulated/proc/update_visuals()
|
||||
if(icy && !icyoverlay)
|
||||
overlays |= icemaster
|
||||
icyoverlay = icemaster
|
||||
else if(icyoverlay && !icy)
|
||||
icyoverlay = null
|
||||
overlays -= icemaster
|
||||
|
||||
var/new_overlay_type = tile_graphic()
|
||||
if(new_overlay_type == atmos_overlay_type)
|
||||
return
|
||||
var/atmos_overlay = get_atmos_overlay_by_name(atmos_overlay_type)
|
||||
if(atmos_overlay)
|
||||
overlays -= atmos_overlay
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
vis_contents -= atmos_overlay
|
||||
|
||||
atmos_overlay = get_atmos_overlay_by_name(new_overlay_type)
|
||||
if(atmos_overlay)
|
||||
overlays += atmos_overlay
|
||||
vis_contents += atmos_overlay
|
||||
atmos_overlay_type = new_overlay_type
|
||||
|
||||
/turf/simulated/proc/get_atmos_overlay_by_name(var/name)
|
||||
/turf/simulated/proc/get_atmos_overlay_by_name(name)
|
||||
switch(name)
|
||||
if("plasma")
|
||||
return plmaster
|
||||
@@ -266,13 +251,13 @@
|
||||
return null
|
||||
|
||||
/turf/simulated/proc/tile_graphic()
|
||||
if(!air)
|
||||
return
|
||||
if(air.toxins > MOLES_PLASMA_VISIBLE)
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
return "plasma"
|
||||
|
||||
var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air.trace_gases
|
||||
if(sleeping_agent && (sleeping_agent.moles > 1))
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
return "sleeping_agent"
|
||||
return null
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
var/global/obj/effect/overlay/plmaster = null
|
||||
var/global/obj/effect/overlay/slmaster = null
|
||||
var/global/obj/effect/overlay/icemaster = null
|
||||
|
||||
// Event Manager, the manager for events.
|
||||
var/datum/event_manager/event_manager = new()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
L.Weaken(3)
|
||||
else
|
||||
if(P.unlimited_power)
|
||||
L.electrocute_act(1000, P, 0) //Just kill them
|
||||
L.electrocute_act(1000, P, safety = TRUE, override = TRUE) //Just kill them
|
||||
else
|
||||
electrocute_mob(L, C, P)
|
||||
break
|
||||
|
||||
@@ -362,20 +362,18 @@ SUBSYSTEM_DEF(air)
|
||||
plmaster = new /obj/effect/overlay()
|
||||
plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
plmaster.icon_state = "plasma"
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
plmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
slmaster = new /obj/effect/overlay()
|
||||
slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
slmaster.icon_state = "sleeping_agent"
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
icemaster = new /obj/effect/overlay()
|
||||
icemaster.icon = 'icons/turf/overlays.dmi'
|
||||
icemaster.icon_state = "snowfloor"
|
||||
icemaster.layer = TURF_LAYER + 0.1
|
||||
icemaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
slmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
#undef SSAIR_PIPENETS
|
||||
#undef SSAIR_ATMOSMACHINERY
|
||||
@@ -383,4 +381,4 @@ SUBSYSTEM_DEF(air)
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
#undef SSAIR_HIGHPRESSURE
|
||||
#undef SSAIR_HOTSPOTS
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
@@ -88,7 +88,7 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
|
||||
var/mob/living/current = target
|
||||
if(bounces < 1)
|
||||
if(damaging)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
current.electrocute_act(bolt_energy, "Lightning Bolt", safety = TRUE)
|
||||
else
|
||||
current.AdjustJitter(1000) //High numbers for violent convulsions
|
||||
current.do_jitter_animation(current.jitteriness)
|
||||
@@ -99,7 +99,7 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
|
||||
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, 1, -1)
|
||||
else
|
||||
if(damaging)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
current.electrocute_act(bolt_energy, "Lightning Bolt", safety = TRUE)
|
||||
else
|
||||
current.AdjustJitter(1000) //High numbers for violent convulsions
|
||||
current.do_jitter_animation(current.jitteriness)
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
increment = 5
|
||||
max = 40
|
||||
prefix = "darkened"
|
||||
claw_damage_increase = 2
|
||||
claw_damage_increase = 4
|
||||
|
||||
/obj/item/whetstone/cult/update_icon()
|
||||
icon_state = "cult_sharpener[used ? "_used" : ""]"
|
||||
|
||||
@@ -28,6 +28,9 @@ var/round_start_time = 0
|
||||
var/list/factions = list() // list of all factions
|
||||
var/list/availablefactions = list() // list of factions with openings
|
||||
|
||||
var/tipped = FALSE //Did we broadcast the tip of the day yet?
|
||||
var/selected_tip // What will be the tip of the day?
|
||||
|
||||
var/pregame_timeleft = 0
|
||||
var/delay_end = 0 //if set to nonzero, the round will not restart on it's own
|
||||
|
||||
@@ -55,6 +58,10 @@ var/round_start_time = 0
|
||||
if(going)
|
||||
pregame_timeleft--
|
||||
|
||||
if(pregame_timeleft <= 60 && !tipped)
|
||||
send_tip_of_the_round()
|
||||
tipped = TRUE
|
||||
|
||||
if(pregame_timeleft <= 0)
|
||||
current_state = GAME_STATE_SETTING_UP
|
||||
Master.SetRunLevel(RUNLEVEL_SETUP)
|
||||
@@ -376,6 +383,20 @@ var/round_start_time = 0
|
||||
if(!istype(M,/mob/new_player))
|
||||
to_chat(M, "Captainship not forced on anyone.")
|
||||
|
||||
/datum/controller/gameticker/proc/send_tip_of_the_round()
|
||||
var/m
|
||||
if(selected_tip)
|
||||
m = selected_tip
|
||||
else
|
||||
var/list/randomtips = file2list("strings/tips.txt")
|
||||
var/list/memetips = file2list("strings/sillytips.txt")
|
||||
if(randomtips.len && prob(95))
|
||||
m = pick(randomtips)
|
||||
else if(memetips.len)
|
||||
m = pick(memetips)
|
||||
|
||||
if(m)
|
||||
to_chat(world, "<span class='purple'><b>Tip of the round: </b>[html_encode(m)]</span>")
|
||||
|
||||
/datum/controller/gameticker/proc/process()
|
||||
if(current_state != GAME_STATE_PLAYING)
|
||||
|
||||
@@ -373,6 +373,11 @@
|
||||
break
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
|
||||
if(!tesla_shock)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/DismantleMachine(var/obj/machinery/target)
|
||||
do_attack_animation(target)
|
||||
to_chat(src, "<span class='info'>We begin to dismantle this machine. We will need to be uninterrupted.</span>")
|
||||
@@ -493,7 +498,7 @@
|
||||
var/mob/living/L = AM
|
||||
if(!istype(L, /mob/living/simple_animal/hostile/swarmer))
|
||||
playsound(loc,'sound/effects/snap.ogg',50, 1, -1)
|
||||
L.electrocute_act(0, src, 1, 1)
|
||||
L.electrocute_act(0, src, 1, TRUE, TRUE)
|
||||
if(isrobot(L) || L.isSynthetic())
|
||||
L.Weaken(5)
|
||||
qdel(src)
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
if(istype(G) && G.summoner == summoner)
|
||||
continue
|
||||
if(successfulshocks > 4)
|
||||
//L.electrocute_act(30, src) //shocks for 30 burn damage
|
||||
L.visible_message(
|
||||
"<span class='danger'>[L] was shocked by the lightning chain!</span>", \
|
||||
"<span class='userdanger'>You are shocked by the lightning chain!</span>", \
|
||||
|
||||
@@ -215,11 +215,11 @@
|
||||
if(!L.on) //wait, wait, don't shock me
|
||||
return
|
||||
flick("[L.base_state]2", L)
|
||||
for(var/mob/living/carbon/human/M in view(shock_range, L))
|
||||
for(var/mob/living/M in view(shock_range, L))
|
||||
if(M == user)
|
||||
return
|
||||
M.Beam(L,icon_state="purple_lightning",icon='icons/effects/effects.dmi',time=5)
|
||||
M.electrocute_act(shock_damage, "[L.name]", safety=1)
|
||||
M.electrocute_act(shock_damage, L, safety = TRUE)
|
||||
do_sparks(4, 0, M)
|
||||
playsound(M, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
power_channel = ENVIRON
|
||||
req_one_access = list(access_atmospherics, access_engine_equip)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100)
|
||||
siemens_strength = 1
|
||||
var/alarm_id = null
|
||||
var/frequency = ATMOS_VENTSCRUB
|
||||
//var/skipprocess = 0 //Experimenting
|
||||
|
||||
@@ -51,6 +51,7 @@ var/list/airlock_overlays = list()
|
||||
explosion_block = 1
|
||||
assemblytype = /obj/structure/door_assembly
|
||||
normalspeed = 1
|
||||
siemens_strength = 1
|
||||
var/security_level = 0 //How much are wires secured
|
||||
var/aiControlDisabled = FALSE //If TRUE, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
var/hackProof = FALSE // if TRUE, this door can't be hacked by the AI
|
||||
@@ -70,7 +71,7 @@ var/list/airlock_overlays = list()
|
||||
var/lockdownbyai = 0
|
||||
var/justzap = 0
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
var/hasShocked = 0 //Prevents multiple shocks from happening
|
||||
var/shockCooldown = FALSE //Prevents multiple shocks from happening
|
||||
var/obj/item/note //Any papers pinned to the airlock
|
||||
var/previous_airlock = /obj/structure/door_assembly //what airlock assembly mineral plating was applied to
|
||||
var/airlock_material //material of inner filling; if its an airlock with glass, this should be set to "glass"
|
||||
@@ -173,10 +174,8 @@ About the new airlock wires panel:
|
||||
else /*if(justzap)*/
|
||||
return
|
||||
else if(user.hallucination > 50 && prob(10) && !operating)
|
||||
to_chat(user, "<span class='danger'>You feel a powerful shock course through your body!</span>")
|
||||
user.adjustStaminaLoss(50)
|
||||
user.AdjustStunned(5)
|
||||
return
|
||||
if(user.electrocute_act(50, src, 1, illusion = TRUE)) // We'll just go with a flat 50 damage, instead of doing powernet checks
|
||||
return
|
||||
..(user)
|
||||
|
||||
/obj/machinery/door/airlock/bumpopen(mob/living/simple_animal/user)
|
||||
@@ -296,16 +295,14 @@ About the new airlock wires panel:
|
||||
// The preceding comment was borrowed from the grille's shock script
|
||||
/obj/machinery/door/airlock/shock(mob/user, prb)
|
||||
if(!arePowerSystemsOn())
|
||||
return 0
|
||||
if(hasShocked)
|
||||
return 0 //Already shocked someone recently?
|
||||
return FALSE
|
||||
if(shockCooldown > world.time)
|
||||
return FALSE //Already shocked someone recently?
|
||||
if(..())
|
||||
hasShocked = 1
|
||||
sleep(10)
|
||||
hasShocked = 0
|
||||
return 1
|
||||
shockCooldown = world.time + 10
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//Checks if the user can get shocked and shocks him if it can. Returns TRUE if it happened
|
||||
/obj/machinery/door/airlock/proc/shock_user(mob/user, prob)
|
||||
|
||||
@@ -119,6 +119,7 @@ Class Procs:
|
||||
var/list/settagwhitelist = list()//WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST.
|
||||
atom_say_verb = "beeps"
|
||||
var/defer_process = 0
|
||||
var/siemens_strength = 0.7 // how badly will it shock you?
|
||||
|
||||
/obj/machinery/Initialize()
|
||||
addAtProcessing()
|
||||
@@ -575,16 +576,13 @@ Class Procs:
|
||||
|
||||
/obj/machinery/proc/shock(mob/user, prb)
|
||||
if(inoperable())
|
||||
return 0
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
if((TK in user.mutations) && !Adjacent(user))
|
||||
return 0
|
||||
return FALSE
|
||||
do_sparks(5, 1, src)
|
||||
if(electrocute_mob(user, get_area(src), src, 0.7))
|
||||
if(user.stunned)
|
||||
return 1
|
||||
return 0
|
||||
if(electrocute_mob(user, get_area(src), src, siemens_strength, TRUE))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//called on machinery construction (i.e from frame to machinery) but not on initialization
|
||||
/obj/machinery/proc/on_construction()
|
||||
|
||||
@@ -438,8 +438,8 @@
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(electrocute_mob(user, get_area(src), src, 1))
|
||||
return 1
|
||||
if(electrocute_mob(user, src, src, 1, TRUE))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/suit_storage_unit/relaymove(mob/user)
|
||||
if(locked)
|
||||
|
||||
@@ -1088,10 +1088,9 @@
|
||||
/obj/machinery/vending/plasmaresearch
|
||||
name = "\improper Toximate 3000"
|
||||
desc = "All the fine parts you need in one vending machine!"
|
||||
products = list(/obj/item/clothing/under/rank/scientist = 6,/obj/item/clothing/suit/bio_suit = 6,/obj/item/clothing/head/bio_hood = 6,
|
||||
/obj/item/transfer_valve = 6,/obj/item/assembly/timer = 6,/obj/item/assembly/signaler = 6,
|
||||
/obj/item/assembly/prox_sensor = 6,/obj/item/assembly/igniter = 6)
|
||||
contraband = list(/obj/item/assembly/health = 3)
|
||||
products = list(/obj/item/assembly/prox_sensor = 8, /obj/item/assembly/igniter = 8, /obj/item/assembly/signaler = 8,
|
||||
/obj/item/wirecutters = 1, /obj/item/assembly/timer = 8)
|
||||
contraband = list(/obj/item/flashlight = 5, /obj/item/assembly/voice = 3, /obj/item/assembly/health = 3, /obj/item/assembly/infra = 3)
|
||||
|
||||
/obj/machinery/vending/wallmed1
|
||||
name = "\improper NanoMed"
|
||||
|
||||
@@ -64,11 +64,6 @@
|
||||
desc = "The banner of the glorious revolutionary forces fighting the oppressors on Clown Planet."
|
||||
icon_state = "mimeflag"
|
||||
|
||||
/obj/item/flag/pony
|
||||
name = "Equestria flag"
|
||||
desc = "The flag of the independent, sovereign nation of Equestria, whatever the fuck that is."
|
||||
icon_state = "ponyflag"
|
||||
|
||||
/obj/item/flag/ian
|
||||
name = "Ian flag"
|
||||
desc = "The banner of Ian, because SQUEEEEE."
|
||||
|
||||
@@ -446,6 +446,23 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/firefighting
|
||||
payload_name = "fire fighting grenade"
|
||||
desc = "Can help to put out dangerous fires from a distance."
|
||||
stage = READY
|
||||
|
||||
/obj/item/grenade/chem_grenade/firefighting/New()
|
||||
..()
|
||||
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("firefighting_foam", 30)
|
||||
B2.reagents.add_reagent("firefighting_foam", 30)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
|
||||
/obj/item/grenade/chem_grenade/incendiary
|
||||
payload_name = "incendiary"
|
||||
desc = "Used for clearing rooms of living things."
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/max = 30
|
||||
var/prefix = "sharpened"
|
||||
var/requires_sharpness = 1
|
||||
var/claw_damage_increase = 1
|
||||
var/claw_damage_increase = 2
|
||||
|
||||
|
||||
/obj/item/whetstone/attackby(obj/item/I, mob/user, params)
|
||||
@@ -58,13 +58,18 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/unarmed_attack/attack = H.dna.species.unarmed
|
||||
if(istype(attack, /datum/unarmed_attack/claws))
|
||||
attack.damage += claw_damage_increase
|
||||
H.visible_message("<span class='notice'>[H] sharpens [H.p_their()] claws on [src]!</span>", "<span class='notice'>You sharpen your claws on [src].</span>")
|
||||
playsound(get_turf(H), usesound, 50, 1)
|
||||
name = "worn out [name]"
|
||||
desc = "[desc] At least, it used to."
|
||||
used = TRUE
|
||||
update_icon()
|
||||
var/datum/unarmed_attack/claws/C = attack
|
||||
if(!C.has_been_sharpened)
|
||||
C.has_been_sharpened = TRUE
|
||||
attack.damage += claw_damage_increase
|
||||
H.visible_message("<span class='notice'>[H] sharpens [H.p_their()] claws on [src]!</span>", "<span class='notice'>You sharpen your claws on [src].</span>")
|
||||
playsound(get_turf(H), usesound, 50, 1)
|
||||
name = "worn out [name]"
|
||||
desc = "[desc] At least, it used to."
|
||||
used = TRUE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can not sharpen your claws any further!</span>")
|
||||
|
||||
/obj/item/whetstone/super
|
||||
name = "super whetstone block"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
new /obj/item/storage/backpack/science(src)
|
||||
new /obj/item/storage/backpack/satchel_tox(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
//new /obj/item/clothing/suit/labcoat/science(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/science(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
|
||||
@@ -245,20 +245,20 @@
|
||||
|
||||
/obj/structure/grille/proc/shock(mob/user, prb)
|
||||
if(!anchored || broken) // unanchored/broken grilles are never connected
|
||||
return 0
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!in_range(src, user))//To prevent TK and mech users from getting shocked
|
||||
return 0
|
||||
return FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if(electrocute_mob(user, C, src))
|
||||
if(electrocute_mob(user, C, src, 1, TRUE))
|
||||
do_sparks(3, 1, src)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
|
||||
@@ -116,9 +116,9 @@
|
||||
if(.)
|
||||
return
|
||||
if(!shockcd)
|
||||
if(ismob(user))
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
M.electrocute_act(15, "Energy Barrier", safety = TRUE)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
@@ -130,6 +130,6 @@
|
||||
return
|
||||
|
||||
var/mob/living/M = AM
|
||||
M.electrocute_act(15, "Energy Barrier", safety = 1)
|
||||
M.electrocute_act(15, "Energy Barrier", safety = TRUE)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
@@ -36,7 +36,10 @@
|
||||
else
|
||||
wet_overlay = image('icons/effects/water.dmi', src, "wet_floor_static")
|
||||
else
|
||||
wet_overlay = image('icons/effects/water.dmi', src, "wet_static")
|
||||
if(wet_setting >= TURF_WET_ICE)
|
||||
wet_overlay = image('icons/effects/water.dmi', src, "ice_floor")
|
||||
else
|
||||
wet_overlay = image('icons/effects/water.dmi', src, "wet_static")
|
||||
overlays += wet_overlay
|
||||
|
||||
spawn(rand(790, 820)) // Purely so for visual effect
|
||||
@@ -75,20 +78,26 @@
|
||||
|
||||
switch(src.wet)
|
||||
if(TURF_WET_WATER)
|
||||
if(!(M.slip("wet floor", 4, 2, tilesSlipped = 0, walkSafely = 1)))
|
||||
if(!(M.slip("the wet floor", 4, 2, tilesSlipped = 0, walkSafely = 1)))
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
|
||||
if(TURF_WET_LUBE) //lube
|
||||
M.slip("floor", 0, 5, tilesSlipped = 3, walkSafely = 0, slipAny = 1)
|
||||
M.slip("the floor", 0, 5, tilesSlipped = 3, walkSafely = 0, slipAny = 1)
|
||||
|
||||
|
||||
if(TURF_WET_ICE) // Ice
|
||||
if(!(prob(30) && M.slip("icy floor", 4, 2, tilesSlipped = 1, walkSafely = 1)))
|
||||
if(M.slip("the icy floor", 4, 2, tilesSlipped = 0, walkSafely = 0))
|
||||
M.inertia_dir = 0
|
||||
if(prob(5))
|
||||
var/obj/item/organ/external/affected = M.get_organ("head")
|
||||
if(affected)
|
||||
M.apply_damage(5, BRUTE, "head")
|
||||
M.visible_message("<span class='warning'><b>[M]</b> hits their head on the ice!</span>")
|
||||
playsound(src, 'sound/weapons/genhit1.ogg', 50, 1)
|
||||
|
||||
if(TURF_WET_PERMAFROST) // Permafrost
|
||||
M.slip("icy floor", 0, 5, tilesSlipped = 1, walkSafely = 0, slipAny = 1)
|
||||
M.slip("the frosted floor", 0, 5, tilesSlipped = 1, walkSafely = 0, slipAny = 1)
|
||||
|
||||
/turf/simulated/ChangeTurf(var/path)
|
||||
. = ..()
|
||||
|
||||
@@ -90,8 +90,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
return
|
||||
|
||||
/turf/simulated/floor/proc/update_icon()
|
||||
if(air)
|
||||
update_visuals()
|
||||
update_visuals()
|
||||
overlays -= current_overlay
|
||||
if(current_overlay)
|
||||
overlays.Add(current_overlay)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/client/verb/randomtip()
|
||||
set category = "OOC"
|
||||
set name = "Give Random Tip"
|
||||
set desc = "Shows you a random tip"
|
||||
|
||||
var/m
|
||||
|
||||
var/list/randomtips = file2list("strings/tips.txt")
|
||||
var/list/memetips = file2list("strings/sillytips.txt")
|
||||
if(randomtips.len && prob(95))
|
||||
m = pick(randomtips)
|
||||
else if(memetips.len)
|
||||
m = pick(memetips)
|
||||
|
||||
if(m)
|
||||
to_chat(src, "<span class='purple'><b>Tip: </b>[html_encode(m)]</span>")
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user