mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into keta
This commit is contained in:
@@ -613,7 +613,7 @@
|
||||
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
|
||||
L2.color = L.color
|
||||
link_lines += L2
|
||||
for(var/obj/machinery/door/poddoor/P in world)
|
||||
for(var/obj/machinery/door/poddoor/P in airlocks)
|
||||
if(P.id_tag == M.id)
|
||||
var/obj/effect/buildmode_line/L = new(holder, M, P, "[M.name] to [P.name]")
|
||||
L.color = M.normaldoorcontrol ? "#993333" : "#339933"
|
||||
|
||||
@@ -38,13 +38,7 @@
|
||||
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A>
|
||||
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A>
|
||||
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
|
||||
<BR>
|
||||
<B>Shuttle options</b><br>
|
||||
<A href='?src=\ref[src];secretsfun=launchshuttle'>Launch a shuttle</A>
|
||||
<A href='?src=\ref[src];secretsfun=forcelaunchshuttle'>Force launch a shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=jumpshuttle'>Jump a shuttle</A>
|
||||
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
|
||||
<BR></center>
|
||||
</center>
|
||||
"}
|
||||
|
||||
else if(check_rights(R_SERVER,0)) //only add this if admin secrets are unavailiable; otherwise, it's added inline
|
||||
@@ -73,7 +67,7 @@
|
||||
<center>
|
||||
<h2><B>IC Events</B></h2>
|
||||
<b>Teams</b><br>
|
||||
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A>
|
||||
<A href='?src=\ref[src];secretsfun=striketeam'>Send in the Deathsquad</A>
|
||||
<A href='?src=\ref[src];secretsfun=striketeam_syndicate'>Send in a syndicate strike team</A>
|
||||
<A href='?src=\ref[src];secretsfun=honksquad'>Send in a HONKsquad</A><BR>
|
||||
<b>Change Security Level</b><BR>
|
||||
|
||||
@@ -1252,6 +1252,7 @@
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] back to the Lobby.")
|
||||
|
||||
var/mob/new_player/NP = new()
|
||||
non_respawnable_keys -= M.ckey
|
||||
NP.ckey = M.ckey
|
||||
qdel(M)
|
||||
|
||||
@@ -2564,7 +2565,7 @@
|
||||
if("eagles")//SCRAW
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
for(var/obj/machinery/door/airlock/W in world)
|
||||
for(var/obj/machinery/door/airlock/W in airlocks)
|
||||
// TODO: Tie into space manager
|
||||
if((W.z in config.station_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
@@ -2758,12 +2759,12 @@
|
||||
dat += "No-one has done anything this round!"
|
||||
usr << browse(dat, "window=admin_log")
|
||||
if("maint_access_brig")
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in world)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
|
||||
if(access_maint_tunnels in M.req_access)
|
||||
M.req_access = list(access_brig)
|
||||
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
|
||||
if("maint_access_engiebrig")
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in world)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
|
||||
if(access_maint_tunnels in M.req_access)
|
||||
M.req_access = list()
|
||||
M.req_one_access = list(access_brig,access_engine)
|
||||
|
||||
@@ -1371,19 +1371,25 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/power/emitter/E in world)
|
||||
for(var/obj/machinery/power/emitter/E in machines)
|
||||
if(E.anchored)
|
||||
E.active = 1
|
||||
|
||||
for(var/obj/machinery/field/generator/F in world)
|
||||
if(F.anchored)
|
||||
F.Varedit_start = 1
|
||||
for(var/obj/machinery/field/generator/F in machines)
|
||||
if(F.active == 0)
|
||||
F.active = 1
|
||||
F.state = 2
|
||||
F.power = 250
|
||||
F.anchored = 1
|
||||
F.warming_up = 3
|
||||
F.start_fields()
|
||||
F.update_icon()
|
||||
|
||||
spawn(30)
|
||||
for(var/obj/machinery/the_singularitygen/G in world)
|
||||
for(var/obj/machinery/the_singularitygen/G in machines)
|
||||
if(G.anchored)
|
||||
var/obj/singularity/S = new /obj/singularity(get_turf(G), 50)
|
||||
spawn(0)
|
||||
qdel(G)
|
||||
// qdel(G)
|
||||
S.energy = 1750
|
||||
S.current_size = 7
|
||||
S.icon = 'icons/effects/224x224.dmi'
|
||||
@@ -1397,7 +1403,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
//S.dissipate_track = 0
|
||||
//S.dissipate_strength = 10
|
||||
|
||||
for(var/obj/machinery/power/rad_collector/Rad in world)
|
||||
for(var/obj/machinery/power/rad_collector/Rad in machines)
|
||||
if(Rad.anchored)
|
||||
if(!Rad.P)
|
||||
var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad)
|
||||
@@ -1409,7 +1415,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!Rad.active)
|
||||
Rad.toggle_power()
|
||||
|
||||
for(var/obj/machinery/power/smes/SMES in world)
|
||||
for(var/obj/machinery/power/smes/SMES in machines)
|
||||
if(SMES.anchored)
|
||||
SMES.input_attempt = 1
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ var/global/list/frozen_mob_list = list()
|
||||
|
||||
///mob freeze procs
|
||||
|
||||
/mob/living/var/frozen = 0 //used for preventing attacks on admin-frozen mobs
|
||||
/mob/living/var/frozen = null //used for preventing attacks on admin-frozen mobs
|
||||
/mob/living/var/admin_prev_sleeping = 0 //used for keeping track of previous sleeping value with admin freeze
|
||||
|
||||
/mob/living/proc/admin_Freeze(var/client/admin)
|
||||
@@ -34,7 +34,7 @@ var/global/list/frozen_mob_list = list()
|
||||
src.overlays += AO
|
||||
|
||||
anchored = 1
|
||||
frozen = 1
|
||||
frozen = AO
|
||||
admin_prev_sleeping = sleeping
|
||||
sleeping += 20000
|
||||
if(!(src in frozen_mob_list))
|
||||
@@ -46,15 +46,16 @@ var/global/list/frozen_mob_list = list()
|
||||
message_admins("\blue [key_name_admin(admin)] unfroze [key_name_admin(src)]")
|
||||
log_admin("[key_name(admin)] unfroze [key_name(src)]")
|
||||
|
||||
update_icons()
|
||||
|
||||
anchored = 0
|
||||
frozen = 0
|
||||
overlays -= frozen
|
||||
frozen = null
|
||||
sleeping = admin_prev_sleeping
|
||||
admin_prev_sleeping = null
|
||||
if(src in frozen_mob_list)
|
||||
frozen_mob_list -= src
|
||||
|
||||
update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/slime/admin_Freeze(admin)
|
||||
..(admin)
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
name = "black hoodie"
|
||||
desc = "It's a hoodie. It has a hood. Most hoodies do."
|
||||
icon_state = "black_hoodie"
|
||||
item_state = "labcoat"
|
||||
item_state = "blueshieldcoat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
hoodtype = /obj/item/clothing/head/hood
|
||||
species_fit = list("Vox")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/event/meteor_wave/goreop/announce()
|
||||
var/meteor_declaration = "MeteorOps have declared thier intent to utterly destroy [station_name()] with thier own bodies, and dares the crew to try and stop them."
|
||||
var/meteor_declaration = "MeteorOps have declared their intent to utterly destroy [station_name()] with their own bodies, and dares the crew to try and stop them."
|
||||
command_announcement.Announce(meteor_declaration, "Declaration of 'War'", 'sound/effects/siren.ogg')
|
||||
|
||||
/datum/event/meteor_wave/goreop/setup()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if((T.z in config.station_levels))
|
||||
pick_turfs += T
|
||||
|
||||
for(var/i = 1, i <= number_of_wormholes, i++)
|
||||
for(var/i in 1 to number_of_wormholes)
|
||||
var/turf/T = pick(pick_turfs)
|
||||
wormholes += new /obj/effect/portal/wormhole(T, null, null, -1)
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
if(T) O.loc = T
|
||||
|
||||
/datum/event/wormholes/end()
|
||||
portals.Remove(wormholes)
|
||||
for(var/obj/effect/portal/wormhole/O in wormholes)
|
||||
O.loc = null
|
||||
qdel(O)
|
||||
wormholes.Cut()
|
||||
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
|
||||
/datum/martial_art/mimejutsu/proc/mimePalm(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.stunned && !D.weakened)
|
||||
D.visible_message("<span class='danger'>[A] has barely touched [D] with thier palm!</span>", \
|
||||
"<span class='userdanger'>[A] hovers thier palm over your face!</span>")
|
||||
D.visible_message("<span class='danger'>[A] has barely touched [D] with their palm!</span>", \
|
||||
"<span class='userdanger'>[A] hovers their palm over your face!</span>")
|
||||
|
||||
var/atom/throw_target = get_edge_target_turf(D, get_dir(D, get_step_away(D, A)))
|
||||
D.throw_at(throw_target, 200, 4,A)
|
||||
|
||||
@@ -3,5 +3,9 @@
|
||||
if(ghostimage)
|
||||
ghostimage.icon_state = src.icon_state
|
||||
updateghostimages()
|
||||
|
||||
if(non_respawnable_keys[ckey])
|
||||
can_reenter_corpse = 0
|
||||
respawnable_list -= src
|
||||
|
||||
update_interface()
|
||||
@@ -129,11 +129,15 @@ Works together with spawning an observer, noted above.
|
||||
|
||||
/mob/proc/ghostize(var/flags = GHOST_CAN_REENTER)
|
||||
if(key)
|
||||
if(non_respawnable_keys[ckey])
|
||||
flags &= ~GHOST_CAN_REENTER
|
||||
var/mob/dead/observer/ghost = new(src, flags) //Transfer safety to observer spawning proc.
|
||||
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
|
||||
respawnable_list -= src
|
||||
if(ghost.can_reenter_corpse)
|
||||
respawnable_list += ghost
|
||||
else
|
||||
non_respawnable_keys[ckey] = 1
|
||||
ghost.key = key
|
||||
if(!(ghost.client && ghost.client.holder) && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
@@ -148,12 +152,28 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set desc = "Relinquish your life and enter the land of the dead."
|
||||
|
||||
var/mob/M = src
|
||||
var/warningmsg = null
|
||||
var/obj/machinery/cryopod/P = istype(loc, /obj/machinery/cryopod) && loc
|
||||
|
||||
if(stat == DEAD)
|
||||
if(P)
|
||||
if(TOO_EARLY_TO_GHOST)
|
||||
warningmsg = "It's too early in the shift to enter cryo"
|
||||
// If it's not too early, we'll skip straight to ghosting out without penalty
|
||||
else if(suiciding && TOO_EARLY_TO_GHOST)
|
||||
warningmsg = "You have committed suicide too early in the round"
|
||||
else if(stat != DEAD)
|
||||
warningmsg = "You are alive"
|
||||
else if(non_respawnable_keys[ckey])
|
||||
warningmsg = "You have lost your right to respawn"
|
||||
|
||||
if(!warningmsg)
|
||||
ghostize(1)
|
||||
else
|
||||
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost now, you probably won't be able to rejoin the round! You can't change your mind, so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
|
||||
if(response != "Ghost") return //didn't want to ghost after-all
|
||||
var/response
|
||||
var/alertmsg = "Are you -sure- you want to ghost?\n([warningmsg]. If you ghost now, you probably won't be able to rejoin the round! You can't change your mind, so choose wisely!)"
|
||||
response = alert(src, alertmsg,"Are you sure you want to ghost?","Ghost","Stay in body")
|
||||
if(response != "Ghost")
|
||||
return //didn't want to ghost after-all
|
||||
resting = 1
|
||||
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
|
||||
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
|
||||
@@ -162,8 +182,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
Morgue = M.loc
|
||||
if(Morgue)
|
||||
Morgue.update()
|
||||
if(istype(M.loc, /obj/machinery/cryopod))
|
||||
var/obj/machinery/cryopod/P = M.loc
|
||||
if(P)
|
||||
if(!P.control_computer)
|
||||
P.find_control_computer(urgent=1)
|
||||
if(P.control_computer)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
req_access = list(access_robotics)
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
var/silenced = 0 //if set to 1, they can't talk.
|
||||
var/next_ping_at = 0
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
|
||||
@@ -53,6 +54,8 @@
|
||||
return 0
|
||||
if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept"))
|
||||
return 0
|
||||
if(!O.can_reenter_corpse)
|
||||
return 0
|
||||
if(O.client)
|
||||
return 1
|
||||
return 0
|
||||
@@ -190,7 +193,11 @@
|
||||
/obj/item/device/mmi/posibrain/attack_ghost(var/mob/dead/observer/O)
|
||||
if(searching)
|
||||
volunteer(O)
|
||||
else
|
||||
return
|
||||
if(brainmob && brainmob.key)
|
||||
return // No point pinging a posibrain with a player already inside
|
||||
if(check_observer(O) && (world.time >= next_ping_at))
|
||||
next_ping_at = world.time + (20 SECONDS)
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for(var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain pings softly.")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(eyes)
|
||||
eyes.update_colour()
|
||||
regenerate_icons()
|
||||
update_body()
|
||||
|
||||
/mob/living/carbon/human/var/list/organs = list()
|
||||
/mob/living/carbon/human/var/list/organs_by_name = list() // map organ names to organs
|
||||
|
||||
@@ -614,6 +614,8 @@
|
||||
H.clear_alert("high")
|
||||
|
||||
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
|
||||
if(!H.client)
|
||||
return
|
||||
if(H.healths)
|
||||
if(H.stat == DEAD)
|
||||
H.healths.icon_state = "health7"
|
||||
@@ -633,11 +635,15 @@
|
||||
else H.healths.icon_state = "health6"
|
||||
|
||||
if(H.healthdoll)
|
||||
H.healthdoll.overlays.Cut()
|
||||
if(H.stat == DEAD)
|
||||
H.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
if(H.healthdoll.overlays.len)
|
||||
H.healthdoll.overlays.Cut()
|
||||
else
|
||||
H.healthdoll.icon_state = "healthdoll_OVERLAY"
|
||||
var/list/new_overlays = list()
|
||||
var/list/cached_overlays = H.healthdoll.cached_healthdoll_overlays
|
||||
// Use the dead health doll as the base, since we have proper "healthy" overlays now
|
||||
H.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
var/damage = O.burn_dam + O.brute_dam
|
||||
var/comparison = (O.max_damage/5)
|
||||
@@ -652,8 +658,10 @@
|
||||
icon_num = 4
|
||||
if(damage > (comparison*4))
|
||||
icon_num = 5
|
||||
if(icon_num)
|
||||
H.healthdoll.overlays += image('icons/mob/screen_gen.dmi',"[O.limb_name][icon_num]")
|
||||
new_overlays += "[O.limb_name][icon_num]"
|
||||
H.healthdoll.overlays += (new_overlays - cached_overlays)
|
||||
H.healthdoll.overlays -= (cached_overlays - new_overlays)
|
||||
H.healthdoll.cached_healthdoll_overlays = new_overlays
|
||||
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
|
||||
@@ -107,17 +107,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
var/list/overlays_standing[TOTAL_LAYERS]
|
||||
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
|
||||
var/icon/skeleton
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/apply_overlay(cache_index)
|
||||
var/image/I = overlays_standing[cache_index]
|
||||
if(I)
|
||||
overlays += I
|
||||
|
||||
/mob/living/carbon/human/proc/remove_overlay(cache_index)
|
||||
if(overlays_standing[cache_index])
|
||||
overlays -= overlays_standing[cache_index]
|
||||
overlays_standing[cache_index] = null
|
||||
var/list/cached_standing_overlays = list() // List of everything currently in a human's actual overlays
|
||||
|
||||
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
|
||||
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
|
||||
@@ -125,6 +115,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
/mob/living/carbon/human/update_icons()
|
||||
var/stealth = 0
|
||||
var/obj/item/clothing/suit/armor/abductor/vest/V // Begin the most snowflakey bullshit code I've ever written. I'm so sorry, but there was no other way.
|
||||
|
||||
for(V in list(wear_suit))
|
||||
if(V.stealth_active)
|
||||
stealth = 1
|
||||
@@ -133,6 +124,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
if(stealth)
|
||||
icon = V.disguise.icon //if the suit is active, reference the suit's current loaded icon and overlays; this does not include hand overlays
|
||||
overlays.Cut()
|
||||
cached_standing_overlays.Cut() // Make sure the cache gets rebuilt once the disguise is gone
|
||||
|
||||
for(var/thing in V.disguise.overlays)
|
||||
if(thing)
|
||||
@@ -146,10 +138,28 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
overlays += I
|
||||
else
|
||||
icon = stand_icon
|
||||
overlays.Cut()
|
||||
var/list/new_overlays = list()
|
||||
var/list/old_overlays = cached_standing_overlays
|
||||
|
||||
for(var/thing in overlays_standing)
|
||||
if(thing) overlays += thing
|
||||
// Totally regenerate if something touched our overlays
|
||||
if(overlays.len != old_overlays.len)
|
||||
overlays.Cut()
|
||||
old_overlays.Cut()
|
||||
|
||||
for(var/i in 1 to TOTAL_LAYERS)
|
||||
var/image/I = overlays_standing[i]
|
||||
if(I)
|
||||
if(istype(I))
|
||||
// Since we avoid full overlay rebuilds, we have to reorganize the layers manually
|
||||
I.layer = (-2 - (TOTAL_LAYERS - i)) // Highest layer gets -2, each prior layer is 1 lower
|
||||
new_overlays += I
|
||||
|
||||
if(frozen) // Admin freeze overlay
|
||||
new_overlays += frozen
|
||||
|
||||
overlays += (new_overlays - old_overlays)
|
||||
overlays -= (old_overlays - new_overlays)
|
||||
cached_standing_overlays = new_overlays
|
||||
|
||||
update_transform()
|
||||
|
||||
@@ -538,12 +548,13 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_fire()
|
||||
remove_overlay(FIRE_LAYER)
|
||||
if(on_fire)
|
||||
overlays_standing[FIRE_LAYER] = image("icon"=fire_dmi, "icon_state"=fire_sprite, "layer"=-FIRE_LAYER)
|
||||
if(!overlays_standing[FIRE_LAYER])
|
||||
overlays_standing[FIRE_LAYER] = image("icon"=fire_dmi, "icon_state"=fire_sprite)
|
||||
update_icons()
|
||||
else
|
||||
overlays_standing[FIRE_LAYER] = null
|
||||
apply_overlay(FIRE_LAYER)
|
||||
update_icons()
|
||||
|
||||
/* --------------------------------------- */
|
||||
//For legacy support.
|
||||
@@ -574,11 +585,12 @@ var/global/list/damage_icon_parts = list()
|
||||
update_inv_legcuffed(0)
|
||||
update_inv_pockets(0)
|
||||
update_inv_wear_pda(0)
|
||||
UpdateDamageIcon()
|
||||
update_icons()
|
||||
update_fire()
|
||||
UpdateDamageIcon(0)
|
||||
force_update_limbs()
|
||||
update_tail_layer(0)
|
||||
overlays.Cut() // Force all overlays to regenerate
|
||||
update_fire()
|
||||
update_icons()
|
||||
/* --------------------------------------- */
|
||||
//vvvvvv UPDATE_INV PROCS vvvvvv
|
||||
|
||||
|
||||
@@ -92,22 +92,6 @@
|
||||
/mob/living/proc/calculate_affecting_pressure(var/pressure)
|
||||
return 0
|
||||
|
||||
|
||||
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
|
||||
/mob/living/proc/burn_skin(burn_amount)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
|
||||
var/divided_damage = (burn_amount)/(H.organs.len)
|
||||
var/extradam = 0 //added to when organ is at max dam
|
||||
for(var/obj/item/organ/external/affecting in H.organs)
|
||||
if(!affecting) continue
|
||||
if(affecting.take_damage(0, divided_damage+extradam)) //TODO: fix the extradam stuff. Or, ebtter yet...rewrite this entire proc ~Carn
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return 1
|
||||
else if(istype(src, /mob/living/silicon/ai))
|
||||
return 0
|
||||
|
||||
/mob/living/proc/adjustBodyTemp(actual, desired, incrementboost)
|
||||
var/temperature = actual
|
||||
var/difference = abs(actual-desired) //get difference
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
if(istype(src,/mob/dead/observer))
|
||||
var/mob/dead/observer/G = src
|
||||
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
to_chat(usr, "\blue <B>Upon using the antagHUD you forfeited the ability to join the round.</B>")
|
||||
to_chat(usr, "<span class='warning'>Upon using the antagHUD you forfeited the ability to join the round.</span>")
|
||||
return
|
||||
if(G.started_as_observer == 1)
|
||||
joinedasobserver = 1
|
||||
@@ -133,6 +133,9 @@
|
||||
to_chat(usr, "<span class='warning'>You must wait 10 minutes to respawn as a drone!</span>")
|
||||
return
|
||||
|
||||
if(alert("Are you sure you want to respawn as a drone?", "Are you sure?", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/drone_fabricator/DF in world)
|
||||
if(DF.stat & NOPOWER || !DF.produce_drones)
|
||||
continue
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
var/obj/screen/zone_sel/zone_sel = null
|
||||
var/obj/screen/leap_icon = null
|
||||
var/obj/screen/healthdoll = null
|
||||
var/obj/screen/healthdoll/healthdoll = null
|
||||
|
||||
var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
|
||||
var/damageoverlaytemp = 0
|
||||
|
||||
@@ -15,10 +15,8 @@
|
||||
var/obj/machinery/field/generator/FG2 = null
|
||||
|
||||
/obj/machinery/field/containment/Destroy()
|
||||
if(FG1 && !FG1.clean_up)
|
||||
FG1.cleanup()
|
||||
if(FG2 && !FG2.clean_up)
|
||||
FG2.cleanup()
|
||||
FG1.fields -= src
|
||||
FG2.fields -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/field/containment/attack_hand(mob/user)
|
||||
@@ -67,35 +65,26 @@
|
||||
/obj/machinery/field
|
||||
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
|
||||
|
||||
/obj/machinery/field/CanPass(mob/mover, turf/target, height=0)
|
||||
/obj/machinery/field/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(hasShocked)
|
||||
return 0
|
||||
if(isliving(mover)) // Don't let mobs through
|
||||
shock_field(mover)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/machinery/field/CanPass(obj/mover, turf/target, height=0)
|
||||
if((istype(mover, /obj/machinery) && !istype(mover, /obj/singularity)) || \
|
||||
istype(mover, /obj/structure) || \
|
||||
istype(mover, /obj/mecha))
|
||||
if(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha))
|
||||
bump_field(mover)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/machinery/field/proc/shock_field(mob/living/user)
|
||||
if(hasShocked)
|
||||
return 0
|
||||
if(isliving(user))
|
||||
hasShocked = 1
|
||||
var/shock_damage = min(rand(30,40),rand(30,40))
|
||||
|
||||
if(iscarbon(user))
|
||||
var/stun = min(shock_damage, 15)
|
||||
user.Stun(stun)
|
||||
user.Weaken(10)
|
||||
user.burn_skin(shock_damage)
|
||||
user.visible_message("<span class='danger'>[user.name] was shocked by the [src.name]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock course through your body, sending you flying!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>")
|
||||
user.electrocute_act(shock_damage, src, 1)
|
||||
|
||||
else if(issilicon(user))
|
||||
if(prob(20))
|
||||
@@ -108,13 +97,14 @@
|
||||
user.updatehealth()
|
||||
bump_field(user)
|
||||
|
||||
spawn(5)
|
||||
hasShocked = 0
|
||||
return
|
||||
|
||||
/obj/machinery/field/proc/bump_field(atom/movable/AM as mob|obj)
|
||||
if(hasShocked)
|
||||
return 0
|
||||
hasShocked = 1
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, AM.loc)
|
||||
s.start()
|
||||
var/atom/target = get_edge_target_turf(AM, get_dir(src, get_step_away(AM, src)))
|
||||
AM.throw_at(target, 200, 4)
|
||||
spawn(5)
|
||||
hasShocked = 0
|
||||
|
||||
@@ -13,6 +13,15 @@ field_generator power level display
|
||||
*/
|
||||
|
||||
#define field_generator_max_power 250
|
||||
|
||||
#define FG_UNSECURED 0
|
||||
#define FG_SECURED 1
|
||||
#define FG_WELDED 2
|
||||
|
||||
#define FG_OFFLINE 0
|
||||
#define FG_CHARGING 1
|
||||
#define FG_ONLINE 2
|
||||
|
||||
/obj/machinery/field/generator
|
||||
name = "Field Generator"
|
||||
desc = "A large thermal battery that projects a high amount of energy when powered."
|
||||
@@ -22,134 +31,109 @@ field_generator power level display
|
||||
density = 1
|
||||
use_power = 0
|
||||
var/const/num_power_levels = 6 // Total number of power level icon has
|
||||
var/Varedit_start = 0
|
||||
var/Varpower = 0
|
||||
var/active = 0
|
||||
var/power_level = 0
|
||||
var/active = FG_OFFLINE
|
||||
var/power = 20 // Current amount of power
|
||||
var/state = 0
|
||||
var/state = FG_UNSECURED
|
||||
var/warming_up = 0
|
||||
var/list/obj/machinery/field/containment/fields
|
||||
var/list/obj/machinery/field/generator/connected_gens
|
||||
var/clean_up = 0
|
||||
|
||||
|
||||
/obj/machinery/field/generator/update_icon()
|
||||
overlays.Cut()
|
||||
if(warming_up)
|
||||
overlays += "+a[warming_up]"
|
||||
if(fields.len)
|
||||
overlays += "+on"
|
||||
// Power level indicator
|
||||
// Scale % power to % num_power_levels and truncate value
|
||||
var/level = round(num_power_levels * power / field_generator_max_power)
|
||||
// Clamp between 0 and num_power_levels for out of range power values
|
||||
level = Clamp(level, 0, num_power_levels)
|
||||
if(level)
|
||||
overlays += "+p[level]"
|
||||
|
||||
return
|
||||
if(power_level)
|
||||
overlays += "+p[power_level]"
|
||||
|
||||
|
||||
/obj/machinery/field/generator/New()
|
||||
..()
|
||||
fields = list()
|
||||
connected_gens = list()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/field/generator/process()
|
||||
if(Varedit_start == 1)
|
||||
if(active == 0)
|
||||
active = 1
|
||||
state = 2
|
||||
power = field_generator_max_power
|
||||
anchored = 1
|
||||
warming_up = 3
|
||||
start_fields()
|
||||
update_icon()
|
||||
Varedit_start = 0
|
||||
|
||||
if(src.active == 2)
|
||||
if(active == FG_ONLINE)
|
||||
calc_power()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/field/generator/attack_hand(mob/user)
|
||||
if(state == 2)
|
||||
if(state == FG_WELDED)
|
||||
if(get_dist(src, user) <= 1)//Need to actually touch the thing to turn it on
|
||||
if(src.active >= 1)
|
||||
to_chat(user, "<span class='warning'>You are unable to turn off the [src.name] once it is online!</span>")
|
||||
if(active >= FG_CHARGING)
|
||||
to_chat(user, "<span class='warning'>You are unable to turn off the [name] once it is online!</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("[user.name] turns on the [src.name].", \
|
||||
"<span class='notice'>You turn on the [src.name].</span>", \
|
||||
user.visible_message("[user.name] turns on the [name].", \
|
||||
"<span class='notice'>You turn on the [name].</span>", \
|
||||
"<span class='italics'>You hear heavy droning.</span>")
|
||||
turn_on()
|
||||
investigate_log("<font color='green'>activated</font> by [user.key].","singulo")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The [src] needs to be firmly secured to the floor first!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='warning'>[src] needs to be firmly secured to the floor first!</span>")
|
||||
|
||||
|
||||
/obj/machinery/field/generator/attackby(obj/item/W, mob/user, params)
|
||||
if(active)
|
||||
to_chat(user, "<span class='warning'>The [src] needs to be off!</span>")
|
||||
to_chat(user, "<span class='warning'>[src] needs to be off!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
switch(state)
|
||||
if(0)
|
||||
if(FG_UNSECURED)
|
||||
if(isinspace()) return
|
||||
state = 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
state = FG_SECURED
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] secures [name] to the floor.", \
|
||||
"<span class='notice'>You secure the external reinforcing bolts to the floor.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
src.anchored = 1
|
||||
if(1)
|
||||
state = 0
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
|
||||
anchored = 1
|
||||
if(FG_SECURED)
|
||||
state = FG_UNSECURED
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user.visible_message("[user.name] unsecures [name] reinforcing bolts from the floor.", \
|
||||
"<span class='notice'>You undo the external reinforcing bolts.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
src.anchored = 0
|
||||
if(2)
|
||||
to_chat(user, "<span class='warning'>The [src.name] needs to be unwelded from the floor!</span>")
|
||||
return
|
||||
anchored = 0
|
||||
if(FG_WELDED)
|
||||
to_chat(user, "<span class='warning'>The [name] needs to be unwelded from the floor!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
switch(state)
|
||||
if(0)
|
||||
to_chat(user, "<span class='warning'>The [src.name] needs to be wrenched to the floor!</span>")
|
||||
return
|
||||
if(1)
|
||||
if(FG_UNSECURED)
|
||||
to_chat(user, "<span class='warning'>The [name] needs to be wrenched to the floor!</span>")
|
||||
|
||||
if(FG_SECURED)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [name] to the floor.", \
|
||||
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
state = FG_WELDED
|
||||
to_chat(user, "<span class='notice'>You weld the field generator to the floor.</span>")
|
||||
else
|
||||
return
|
||||
if(2)
|
||||
|
||||
if(FG_WELDED)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [name] free from the floor.", \
|
||||
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
state = FG_SECURED
|
||||
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
|
||||
else
|
||||
return
|
||||
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/field/generator/emp_act()
|
||||
@@ -164,30 +148,35 @@ field_generator power level display
|
||||
|
||||
/obj/machinery/field/generator/bullet_act(obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet")
|
||||
power += Proj.damage
|
||||
update_icon()
|
||||
power = min(power + Proj.damage, field_generator_max_power)
|
||||
check_power_level()
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/field/generator/Destroy()
|
||||
src.cleanup()
|
||||
cleanup()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/field/generator/proc/check_power_level()
|
||||
var/new_level = round(num_power_levels * power / field_generator_max_power)
|
||||
if(new_level != power_level)
|
||||
power_level = new_level
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/field/generator/proc/turn_off()
|
||||
active = 0
|
||||
active = FG_OFFLINE
|
||||
spawn(1)
|
||||
src.cleanup()
|
||||
while(warming_up>0 && !active)
|
||||
cleanup()
|
||||
while(warming_up > 0 && !active)
|
||||
sleep(50)
|
||||
warming_up--
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/field/generator/proc/turn_on()
|
||||
active = 1
|
||||
active = FG_CHARGING
|
||||
spawn(1)
|
||||
while(warming_up<3 && active)
|
||||
while(warming_up < 3 && active)
|
||||
sleep(50)
|
||||
warming_up++
|
||||
update_icon()
|
||||
@@ -196,44 +185,35 @@ field_generator power level display
|
||||
|
||||
|
||||
/obj/machinery/field/generator/proc/calc_power()
|
||||
if(Varpower)
|
||||
return 1
|
||||
var/power_draw = 2 + fields.len
|
||||
|
||||
update_icon()
|
||||
if(src.power > field_generator_max_power)
|
||||
src.power = field_generator_max_power
|
||||
|
||||
var/power_draw = 2
|
||||
for(var/obj/machinery/field/containment/F in fields)
|
||||
if(isnull(F))
|
||||
continue
|
||||
power_draw++
|
||||
if(draw_power(round(power_draw/2,1)))
|
||||
if(draw_power(round(power_draw/2, 1)))
|
||||
check_power_level()
|
||||
return 1
|
||||
else
|
||||
visible_message("<span class='danger'>The [src.name] shuts down!</span>", "<span class='italics'>You hear something shutting down.</span>")
|
||||
visible_message("<span class='danger'>The [name] shuts down!</span>", "<span class='italics'>You hear something shutting down.</span>")
|
||||
turn_off()
|
||||
investigate_log("ran out of power and <font color='red'>deactivated</font>","singulo")
|
||||
src.power = 0
|
||||
power = 0
|
||||
check_power_level()
|
||||
return 0
|
||||
|
||||
//This could likely be better, it tends to start loopin if you have a complex generator loop setup. Still works well enough to run the engine fields will likely recode the field gens and fields sometime -Mport
|
||||
/obj/machinery/field/generator/proc/draw_power(draw = 0, failsafe = 0, obj/machinery/field/generator/G = null, obj/machinery/field/generator/last = null)
|
||||
if(Varpower)
|
||||
return 1
|
||||
if((G && G == src) || (failsafe >= 8))//Loopin, set fail
|
||||
if((G && (G == src)) || (failsafe >= 8))//Loopin, set fail
|
||||
return 0
|
||||
else
|
||||
failsafe++
|
||||
if(src.power >= draw)//We have enough power
|
||||
src.power -= draw
|
||||
|
||||
if(power >= draw)//We have enough power
|
||||
power -= draw
|
||||
return 1
|
||||
|
||||
else//Need more power
|
||||
draw -= src.power
|
||||
src.power = 0
|
||||
for(var/obj/machinery/field/generator/FG in connected_gens)
|
||||
if(isnull(FG))
|
||||
continue
|
||||
draw -= power
|
||||
power = 0
|
||||
for(var/CG in connected_gens)
|
||||
var/obj/machinery/field/generator/FG = CG
|
||||
if(FG == last)//We just asked you
|
||||
continue
|
||||
if(G)//Another gen is askin for power and we dont have it
|
||||
@@ -249,7 +229,7 @@ field_generator power level display
|
||||
|
||||
|
||||
/obj/machinery/field/generator/proc/start_fields()
|
||||
if(!src.state == 2 || !anchored)
|
||||
if(state != FG_WELDED || !anchored)
|
||||
turn_off()
|
||||
return
|
||||
spawn(1)
|
||||
@@ -260,82 +240,73 @@ field_generator power level display
|
||||
setup_field(4)
|
||||
spawn(4)
|
||||
setup_field(8)
|
||||
src.active = 2
|
||||
spawn(5)
|
||||
active = FG_ONLINE
|
||||
|
||||
|
||||
/obj/machinery/field/generator/proc/setup_field(NSEW)
|
||||
var/turf/T = src.loc
|
||||
var/obj/machinery/field/generator/G
|
||||
var/turf/T = loc
|
||||
if(!istype(T))
|
||||
return 0
|
||||
|
||||
var/obj/machinery/field/generator/G = null
|
||||
var/steps = 0
|
||||
if(!NSEW)//Make sure its ran right
|
||||
return
|
||||
for(var/dist = 0, dist <= 9, dist += 1) // checks out to 8 tiles away for another generator
|
||||
return 0
|
||||
for(var/dist in 0 to 7) // checks out to 8 tiles away for another generator
|
||||
T = get_step(T, NSEW)
|
||||
if(T.density)//We cant shoot a field though this
|
||||
return 0
|
||||
for(var/atom/A in T.contents)
|
||||
if(ismob(A))
|
||||
continue
|
||||
if(!istype(A,/obj/machinery/field/generator))
|
||||
if((istype(A,/obj/machinery/door)||istype(A,/obj/machinery/the_singularitygen))&&(A.density))
|
||||
return 0
|
||||
steps += 1
|
||||
|
||||
G = locate(/obj/machinery/field/generator) in T
|
||||
if(!isnull(G))
|
||||
if(G)
|
||||
steps -= 1
|
||||
if(!G.active)
|
||||
return 0
|
||||
break
|
||||
if(isnull(G))
|
||||
return
|
||||
T = src.loc
|
||||
for(var/dist = 0, dist < steps, dist += 1) // creates each field tile
|
||||
|
||||
for(var/TC in T.contents)
|
||||
var/atom/A = TC
|
||||
if(ismob(A))
|
||||
continue
|
||||
if(A.density)
|
||||
return 0
|
||||
|
||||
steps++
|
||||
|
||||
if(!G)
|
||||
return 0
|
||||
|
||||
T = loc
|
||||
for(var/dist in 0 to steps) // creates each field tile
|
||||
var/field_dir = get_dir(T,get_step(G.loc, NSEW))
|
||||
T = get_step(T, NSEW)
|
||||
if(!locate(/obj/machinery/field/containment) in T)
|
||||
var/obj/machinery/field/containment/CF = new/obj/machinery/field/containment()
|
||||
CF.set_master(src,G)
|
||||
fields += CF
|
||||
G.fields += CF
|
||||
CF.loc = T
|
||||
CF.dir = field_dir
|
||||
for(var/mob/living/L in CF.loc)
|
||||
fields += CF
|
||||
G.fields += CF
|
||||
for(var/mob/living/L in T)
|
||||
CF.Crossed(L)
|
||||
var/listcheck = 0
|
||||
for(var/obj/machinery/field/generator/FG in connected_gens)
|
||||
if(isnull(FG))
|
||||
continue
|
||||
if(FG == G)
|
||||
listcheck = 1
|
||||
break
|
||||
if(!listcheck)
|
||||
connected_gens.Add(G)
|
||||
listcheck = 0
|
||||
for(var/obj/machinery/field/generator/FG2 in G.connected_gens)
|
||||
if(isnull(FG2))
|
||||
continue
|
||||
if(FG2 == src)
|
||||
listcheck = 1
|
||||
break
|
||||
if(!listcheck)
|
||||
G.connected_gens.Add(src)
|
||||
|
||||
connected_gens |= G
|
||||
G.connected_gens |= src
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/field/generator/proc/cleanup()
|
||||
clean_up = 1
|
||||
for(var/obj/machinery/field/containment/F in fields)
|
||||
if(isnull(F))
|
||||
continue
|
||||
for(var/F in fields)
|
||||
qdel(F)
|
||||
fields = list()
|
||||
for(var/obj/machinery/field/generator/FG in connected_gens)
|
||||
if(isnull(FG))
|
||||
continue
|
||||
FG.connected_gens.Remove(src)
|
||||
|
||||
for(var/CG in connected_gens)
|
||||
var/obj/machinery/field/generator/FG = CG
|
||||
FG.connected_gens -= src
|
||||
if(!FG.clean_up)//Makes the other gens clean up as well
|
||||
FG.cleanup()
|
||||
connected_gens.Remove(FG)
|
||||
connected_gens = list()
|
||||
connected_gens -= FG
|
||||
clean_up = 0
|
||||
update_icon()
|
||||
|
||||
@@ -359,3 +330,11 @@ field_generator power level display
|
||||
/obj/machinery/field/generator/bump_field(atom/movable/AM as mob|obj)
|
||||
if(fields.len)
|
||||
..()
|
||||
|
||||
#undef FG_UNSECURED
|
||||
#undef FG_SECURED
|
||||
#undef FG_WELDED
|
||||
|
||||
#undef FG_OFFLINE
|
||||
#undef FG_CHARGING
|
||||
#undef FG_ONLINE
|
||||
|
||||
@@ -149,17 +149,18 @@
|
||||
dissipate_delay = 10
|
||||
dissipate_track = 0
|
||||
dissipate_strength = 1
|
||||
if(STAGE_TWO)//1 to 3 does not check for the turfs if you put the gens right next to a 1x1 then its going to eat them
|
||||
current_size = STAGE_TWO
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "singularity_s3"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
grav_pull = 6
|
||||
consume_range = 1
|
||||
dissipate_delay = 5
|
||||
dissipate_track = 0
|
||||
dissipate_strength = 5
|
||||
if(STAGE_TWO)
|
||||
if((check_turfs_in(1,1))&&(check_turfs_in(2,1))&&(check_turfs_in(4,1))&&(check_turfs_in(8,1)))
|
||||
current_size = STAGE_TWO
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "singularity_s3"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
grav_pull = 6
|
||||
consume_range = 1
|
||||
dissipate_delay = 5
|
||||
dissipate_track = 0
|
||||
dissipate_strength = 5
|
||||
if(STAGE_THREE)
|
||||
if((check_turfs_in(1,2))&&(check_turfs_in(2,2))&&(check_turfs_in(4,2))&&(check_turfs_in(8,2)))
|
||||
current_size = STAGE_THREE
|
||||
@@ -238,22 +239,22 @@
|
||||
|
||||
/obj/singularity/proc/eat()
|
||||
set background = BACKGROUND_ENABLED
|
||||
for(var/tile in spiral_range_turfs(grav_pull, src, 1))
|
||||
for(var/tile in spiral_range_turfs(grav_pull, src))
|
||||
var/turf/T = tile
|
||||
if(!T)
|
||||
if(!T || !isturf(loc))
|
||||
continue
|
||||
if(get_dist(T, src) > consume_range)
|
||||
T.singularity_pull(src, current_size)
|
||||
else
|
||||
consume(T)
|
||||
for(var/thing in T)
|
||||
var/atom/movable/X = thing
|
||||
if(get_dist(X, src) > consume_range)
|
||||
X.singularity_pull(src, current_size)
|
||||
else
|
||||
consume(X)
|
||||
if(isturf(loc) && thing != src)
|
||||
var/atom/movable/X = thing
|
||||
if(get_dist(X, src) > consume_range)
|
||||
X.singularity_pull(src, current_size)
|
||||
else
|
||||
consume(X)
|
||||
CHECK_TICK
|
||||
return
|
||||
|
||||
/obj/singularity/proc/consume(var/atom/A)
|
||||
var/gain = A.singularity_act(current_size)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define TESLA_DEFAULT_POWER 1738260
|
||||
#define TESLA_MINI_POWER 869130
|
||||
|
||||
var/list/blacklisted_tesla_types = list(/obj/machinery/atmospherics,
|
||||
var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
/obj/machinery/power/emitter,
|
||||
/obj/machinery/field/generator,
|
||||
/mob/living/simple_animal,
|
||||
@@ -15,7 +15,7 @@ var/list/blacklisted_tesla_types = list(/obj/machinery/atmospherics,
|
||||
/obj/machinery/field/containment,
|
||||
/obj/structure/disposalpipe,
|
||||
/obj/structure/sign,
|
||||
/obj/machinery/gateway)
|
||||
/obj/machinery/gateway))
|
||||
|
||||
/obj/singularity/energy_ball
|
||||
name = "energy ball"
|
||||
@@ -175,7 +175,7 @@ var/list/blacklisted_tesla_types = list(/obj/machinery/atmospherics,
|
||||
closest_atom = A
|
||||
closest_dist = dist
|
||||
|
||||
else if(closest_grounding_rod || is_type_in_list(A, blacklisted_tesla_types))
|
||||
else if(closest_grounding_rod || is_type_in_typecache(A, blacklisted_tesla_types))
|
||||
continue
|
||||
|
||||
else if(istype(A, /mob/living))
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
/obj/item/ammo_box/magazine/m45
|
||||
name = "handgun magazine (.45)"
|
||||
icon_state = "45-8"
|
||||
icon_state = "45"
|
||||
ammo_type = /obj/item/ammo_casing/c45
|
||||
caliber = ".45"
|
||||
max_ammo = 8
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
/datum/reagent/holywater/on_mob_life(mob/living/M)
|
||||
M.jitteriness = max(M.jitteriness-5,0)
|
||||
if(current_cycle >= 30) // 12 units, 60 seconds @ metabolism 0.4 units & tick rate 2.0 sec
|
||||
M.stuttering += 4
|
||||
M.stuttering = min(M.stuttering+4, 20)
|
||||
M.Dizzy(5)
|
||||
if(iscultist(M) && prob(5))
|
||||
M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","Egkau'haom'nai en Chaous","Ho Diak'nos tou Ap'iron","R'ge Na'sie","Diabo us Vo'iscum","Si gn'um Co'nu"))
|
||||
|
||||
@@ -403,6 +403,8 @@
|
||||
return 0
|
||||
if(O.mind && O.mind.current && O.mind.current.stat != DEAD)
|
||||
return 0
|
||||
if(!O.can_reenter_corpse)
|
||||
return 0
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -89,13 +89,13 @@
|
||||
move_gamma_ship()
|
||||
|
||||
if(security_level < SEC_LEVEL_RED)
|
||||
for(var/obj/machinery/door/airlock/highsecurity/red/R in world)
|
||||
for(var/obj/machinery/door/airlock/highsecurity/red/R in airlocks)
|
||||
// TODO: Tie into space manager
|
||||
if((R.z in config.station_levels))
|
||||
R.locked = 0
|
||||
R.update_icon()
|
||||
|
||||
for(var/obj/machinery/door/airlock/hatch/gamma/H in world)
|
||||
for(var/obj/machinery/door/airlock/hatch/gamma/H in airlocks)
|
||||
// TODO: Tie into space manager
|
||||
if((H.z in config.station_levels))
|
||||
H.locked = 0
|
||||
|
||||
Reference in New Issue
Block a user