mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-25 04:56:29 +01:00
Ports /vg/'s Nas-Sie remake.
Second phase: New Nar-Sie itself. Two endgame phase - Nar-Sie and Supermatter Cascade. Culty mobs.
This commit is contained in:
@@ -670,6 +670,16 @@ var/global/floorIsLava = 0
|
||||
if(check_rights(R_SERVER,0))
|
||||
dat += "<A href='?src=\ref[src];secretsfun=togglebombcap'>Toggle bomb cap</A><BR>"
|
||||
|
||||
if(check_rights(R_SERVER|R_FUN,0))
|
||||
dat += {"
|
||||
<BR>
|
||||
<B>Final Solutions</B><BR>
|
||||
<I>(Warning, these will end the round!)</I><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsfun=hellonearth'>Summon Nar-Sie</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=supermattercascade'>Start a Supermatter Cascade</A><BR>
|
||||
"}
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(check_rights(R_DEBUG,0))
|
||||
|
||||
@@ -2257,6 +2257,33 @@
|
||||
feedback_add_details("admin_secrets_fun_used","OO")
|
||||
only_one()
|
||||
message_admins("[key_name_admin(usr)] has triggered a battle to the death (only one)")
|
||||
|
||||
if("togglenarsie")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","NA")
|
||||
var/choice = input("How do you wish for narsie to interact with her surroundings?") in list("CultStation13", "Nar-Singulo")
|
||||
if(choice == "CultStation13")
|
||||
message_admins("[key_name_admin(usr)] has set narsie's behaviour to \"CultStation13\".")
|
||||
narsie_behaviour = "CultStation13"
|
||||
if(choice == "Nar-Singulo")
|
||||
message_admins("[key_name_admin(usr)] has set narsie's behaviour to \"Nar-Singulo\".")
|
||||
narsie_behaviour = "Nar-Singulo"
|
||||
if("hellonearth")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","NS")
|
||||
var/choice = input("You sure you want to end the round and summon narsie at your location? Misuse of this could result in removal of flags or halarity.") in list("PRAISE SATAN", "Cancel")
|
||||
if(choice == "PRAISE SATAN")
|
||||
new /obj/machinery/singularity/narsie/large(get_turf(usr))
|
||||
message_admins("[key_name_admin(usr)] has summoned narsie and brought about a new realm of suffering.")
|
||||
if("supermattercascade")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SC")
|
||||
var/choice = input("You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or halarity.") in list("NO TIME TO EXPLAIN", "Cancel")
|
||||
if(choice == "NO TIME TO EXPLAIN")
|
||||
explosion(get_turf(usr), 8, 16, 24, 32, 1)
|
||||
new /turf/unsimulated/wall/supermatter(get_turf(usr))
|
||||
SetUniversalState(/datum/universal_state/supermatter_cascade)
|
||||
message_admins("[key_name_admin(usr)] has managed to destroy the universe with a supermatter cascade. Good job, [key_name_admin(usr)]")
|
||||
if(usr)
|
||||
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
|
||||
if (ok)
|
||||
|
||||
@@ -29,6 +29,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
|
||||
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
|
||||
var/ghostvision = 1 //is the ghost able to see things humans can't?
|
||||
var/seedarkness = 1
|
||||
incorporeal_move = 1
|
||||
|
||||
/mob/dead/observer/New(mob/body)
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
@@ -193,29 +194,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
|
||||
announce_ghost_joinleave(ghost)
|
||||
|
||||
|
||||
/mob/dead/observer/Move(NewLoc, direct)
|
||||
following = null
|
||||
set_dir(direct)
|
||||
if(NewLoc)
|
||||
loc = NewLoc
|
||||
for(var/obj/effect/step_trigger/S in NewLoc)
|
||||
S.Crossed(src)
|
||||
|
||||
return
|
||||
loc = get_turf(src) //Get out of closets and such as a ghost
|
||||
if((direct & NORTH) && y < world.maxy)
|
||||
y++
|
||||
else if((direct & SOUTH) && y > 1)
|
||||
y--
|
||||
if((direct & EAST) && x < world.maxx)
|
||||
x++
|
||||
else if((direct & WEST) && x > 1)
|
||||
x--
|
||||
|
||||
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
|
||||
S.Crossed(src)
|
||||
|
||||
/mob/dead/observer/can_use_hands() return 0
|
||||
/mob/dead/observer/is_active() return 0
|
||||
|
||||
@@ -316,11 +294,23 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!thearea) return
|
||||
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/holyblock = 0
|
||||
|
||||
if(usr.invisibility <= SEE_INVISIBLE_LIVING || (usr.mind in cult.current_antagonists))
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
if(!T.holy)
|
||||
L+=T
|
||||
else
|
||||
holyblock = 1
|
||||
else
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
|
||||
if(!L || !L.len)
|
||||
usr << "No area available."
|
||||
if(holyblock)
|
||||
usr << "<span class='warning'>This area has been entirely made into sacred grounds, you cannot enter it while you are in this plane of existence!</span>"
|
||||
else
|
||||
usr << "No area available."
|
||||
|
||||
usr.loc = pick(L)
|
||||
following = null
|
||||
@@ -336,7 +326,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
// This is the ghost's follow verb with an argument
|
||||
/mob/dead/observer/proc/ManualFollow(var/atom/movable/target)
|
||||
if(target && target != src)
|
||||
if(!target)
|
||||
return
|
||||
|
||||
var/turf/targetloc = get_turf(target)
|
||||
if(check_holy(targetloc))
|
||||
usr << "<span class='warning'>You cannot follow a mob standing on holy grounds!</span>"
|
||||
return
|
||||
if(target != src)
|
||||
if(following && following == target)
|
||||
return
|
||||
following = target
|
||||
@@ -351,6 +348,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
loc = T
|
||||
sleep(15)
|
||||
|
||||
/mob/proc/check_holy(var/turf/T)
|
||||
return 0
|
||||
|
||||
/mob/dead/observer/check_holy(var/turf/T)
|
||||
if(check_rights(R_ADMIN|R_FUN, 0, src))
|
||||
return 0
|
||||
|
||||
return (T && T.holy) && (invisibility <= SEE_INVISIBLE_LIVING || (mind in cult.current_antagonists))
|
||||
|
||||
/mob/dead/observer/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
set category = "Ghost"
|
||||
set name = "Jump to Mob"
|
||||
@@ -393,6 +399,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = 1
|
||||
src << "\red You are dead! You have no mind to store memory!"
|
||||
|
||||
/mob/dead/observer/Post_Incorpmove()
|
||||
following = null
|
||||
|
||||
/mob/dead/observer/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// Arise!
|
||||
cultnet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/death()
|
||||
/mob/living/death(gibbed, deathmessage="seizes up and falls limp...")
|
||||
if(..())
|
||||
// If true, the mob went from living to dead (assuming everyone has been overriding as they should...)
|
||||
cultnet.updateVisibility(src)
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
|
||||
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
|
||||
|
||||
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
|
||||
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
|
||||
|
||||
var/t_phoron = null
|
||||
var/t_oxygen = null
|
||||
var/t_sl_gas = null
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up ¬_¬ ~Carn
|
||||
..()
|
||||
for(var/obj/effect/rune/rune in world)
|
||||
var/image/blood = image(loc = rune)
|
||||
blood.override = 1
|
||||
client.images += blood
|
||||
for(var/obj/effect/rune/rune in rune_list)
|
||||
client.images += rune.blood_image
|
||||
regenerate_icons()
|
||||
flash = new /obj/screen()
|
||||
flash.icon_state = "blank"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "punches"
|
||||
response_disarm = "flailed at"
|
||||
response_harm = "punched"
|
||||
icon_dead = "shade_dead"
|
||||
speed = -1
|
||||
a_intent = I_HURT
|
||||
@@ -14,7 +14,7 @@
|
||||
status_flags = CANPUSH
|
||||
universal_speak = 0
|
||||
universal_understand = 1
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
attack_sound = 'sound/weapons/spiderlunge.ogg'
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
@@ -24,7 +24,7 @@
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
show_stat_health = 0
|
||||
show_stat_health = 1
|
||||
faction = "cult"
|
||||
supernatural = 1
|
||||
var/nullblock = 0
|
||||
@@ -44,8 +44,9 @@
|
||||
add_language("Cult")
|
||||
add_language("Occult")
|
||||
for(var/spell in construct_spells)
|
||||
spell_list += new spell(src)
|
||||
src.add_spell(new spell, "const_spell_ready")
|
||||
updateicon()
|
||||
add_glow()
|
||||
|
||||
/mob/living/simple_animal/construct/death()
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
@@ -99,7 +100,7 @@
|
||||
mob_size = 20
|
||||
speed = 3
|
||||
environment_smash = 2
|
||||
attack_sound = 'sound/weapons/punch3.ogg'
|
||||
attack_sound = 'sound/weapons/heavysmash.ogg'
|
||||
status_flags = 0
|
||||
resistance = 10
|
||||
construct_spells = list(/spell/aoe_turf/conjure/forcewall/lesser)
|
||||
@@ -150,7 +151,7 @@
|
||||
speed = -1
|
||||
environment_smash = 1
|
||||
see_in_dark = 7
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_sound = 'sound/weapons/rapidslice.ogg'
|
||||
construct_spells = list(/spell/targeted/ethereal_jaunt/shift)
|
||||
|
||||
|
||||
@@ -167,14 +168,14 @@
|
||||
icon_living = "artificer"
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
response_harm = "viciously beats"
|
||||
response_harm = "viciously beaten"
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attacktext = "rammed"
|
||||
speed = 0
|
||||
environment_smash = 2
|
||||
attack_sound = 'sound/weapons/punch2.ogg'
|
||||
environment_smash = 1
|
||||
attack_sound = 'sound/weapons/rapidslice.ogg'
|
||||
construct_spells = list(/spell/aoe_turf/conjure/construct/lesser,
|
||||
/spell/aoe_turf/conjure/wall,
|
||||
/spell/aoe_turf/conjure/floor,
|
||||
@@ -196,14 +197,14 @@
|
||||
maxHealth = 750
|
||||
health = 750
|
||||
speak_emote = list("rumbles")
|
||||
response_harm = "harmlessly punches"
|
||||
response_harm = "harmlessly punched"
|
||||
harm_intent_damage = 0
|
||||
melee_damage_lower = 50
|
||||
melee_damage_upper = 50
|
||||
attacktext = "brutally crushed"
|
||||
speed = 5
|
||||
environment_smash = 2
|
||||
attack_sound = 'sound/weapons/punch4.ogg'
|
||||
attack_sound = 'sound/weapons/heavysmash.ogg'
|
||||
resistance = 10
|
||||
var/energy = 0
|
||||
var/max_energy = 1000
|
||||
@@ -224,7 +225,7 @@
|
||||
health = 150
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 25
|
||||
attacktext = "violently stabs"
|
||||
attacktext = "violently stabbed"
|
||||
speed = -1
|
||||
environment_smash = 1
|
||||
see_in_dark = 7
|
||||
@@ -235,3 +236,99 @@
|
||||
/spell/aoe_turf/knock/harvester,
|
||||
/spell/rune_write
|
||||
)
|
||||
|
||||
////////////////Glow//////////////////
|
||||
/mob/living/simple_animal/construct/proc/add_glow()
|
||||
overlays = 0
|
||||
var/overlay_layer = LIGHTING_LAYER+1
|
||||
if(layer != MOB_LAYER)
|
||||
overlay_layer=TURF_LAYER+0.2
|
||||
|
||||
overlays += image(icon,"glow-[icon_state]",overlay_layer)
|
||||
|
||||
////////////////HUD//////////////////////
|
||||
|
||||
/mob/living/simple_animal/construct/Life()
|
||||
. = ..()
|
||||
if(.)
|
||||
if(fire)
|
||||
if(fire_alert) fire.icon_state = "fire1"
|
||||
else fire.icon_state = "fire0"
|
||||
if(pullin)
|
||||
if(pulling) pullin.icon_state = "pull1"
|
||||
else pullin.icon_state = "pull0"
|
||||
|
||||
if(purged)
|
||||
if(purge > 0) purged.icon_state = "purge1"
|
||||
else purged.icon_state = "purge0"
|
||||
|
||||
silence_spells(purge)
|
||||
|
||||
/mob/living/simple_animal/construct/armoured/Life()
|
||||
..()
|
||||
if(healths)
|
||||
switch(health)
|
||||
if(250 to INFINITY) healths.icon_state = "juggernaut_health0"
|
||||
if(208 to 249) healths.icon_state = "juggernaut_health1"
|
||||
if(167 to 207) healths.icon_state = "juggernaut_health2"
|
||||
if(125 to 166) healths.icon_state = "juggernaut_health3"
|
||||
if(84 to 124) healths.icon_state = "juggernaut_health4"
|
||||
if(42 to 83) healths.icon_state = "juggernaut_health5"
|
||||
if(1 to 41) healths.icon_state = "juggernaut_health6"
|
||||
else healths.icon_state = "juggernaut_health7"
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/behemoth/Life()
|
||||
..()
|
||||
if(healths)
|
||||
switch(health)
|
||||
if(750 to INFINITY) healths.icon_state = "juggernaut_health0"
|
||||
if(625 to 749) healths.icon_state = "juggernaut_health1"
|
||||
if(500 to 624) healths.icon_state = "juggernaut_health2"
|
||||
if(375 to 499) healths.icon_state = "juggernaut_health3"
|
||||
if(250 to 374) healths.icon_state = "juggernaut_health4"
|
||||
if(125 to 249) healths.icon_state = "juggernaut_health5"
|
||||
if(1 to 124) healths.icon_state = "juggernaut_health6"
|
||||
else healths.icon_state = "juggernaut_health7"
|
||||
|
||||
/mob/living/simple_animal/construct/builder/Life()
|
||||
..()
|
||||
if(healths)
|
||||
switch(health)
|
||||
if(50 to INFINITY) healths.icon_state = "artificer_health0"
|
||||
if(42 to 49) healths.icon_state = "artificer_health1"
|
||||
if(34 to 41) healths.icon_state = "artificer_health2"
|
||||
if(26 to 33) healths.icon_state = "artificer_health3"
|
||||
if(18 to 25) healths.icon_state = "artificer_health4"
|
||||
if(10 to 17) healths.icon_state = "artificer_health5"
|
||||
if(1 to 9) healths.icon_state = "artificer_health6"
|
||||
else healths.icon_state = "artificer_health7"
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/wraith/Life()
|
||||
..()
|
||||
if(healths)
|
||||
switch(health)
|
||||
if(75 to INFINITY) healths.icon_state = "wraith_health0"
|
||||
if(62 to 74) healths.icon_state = "wraith_health1"
|
||||
if(50 to 61) healths.icon_state = "wraith_health2"
|
||||
if(37 to 49) healths.icon_state = "wraith_health3"
|
||||
if(25 to 36) healths.icon_state = "wraith_health4"
|
||||
if(12 to 24) healths.icon_state = "wraith_health5"
|
||||
if(1 to 11) healths.icon_state = "wraith_health6"
|
||||
else healths.icon_state = "wraith_health7"
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/harvester/Life()
|
||||
..()
|
||||
if(healths)
|
||||
switch(health)
|
||||
if(150 to INFINITY) healths.icon_state = "harvester_health0"
|
||||
if(125 to 149) healths.icon_state = "harvester_health1"
|
||||
if(100 to 124) healths.icon_state = "harvester_health2"
|
||||
if(75 to 99) healths.icon_state = "harvester_health3"
|
||||
if(50 to 74) healths.icon_state = "harvester_health4"
|
||||
if(25 to 49) healths.icon_state = "harvester_health5"
|
||||
if(1 to 24) healths.icon_state = "harvester_health6"
|
||||
else healths.icon_state = "harvester_health7"
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/mob/living/simple_animal/hostile/scarybat
|
||||
name = "space bats"
|
||||
desc = "A swarm of cute little blood sucking bats that looks pretty upset."
|
||||
icon = 'icons/mob/bats.dmi'
|
||||
icon_state = "bat"
|
||||
icon_living = "bat"
|
||||
icon_dead = "bat_dead"
|
||||
icon_gib = "bat_dead"
|
||||
speak_chance = 0
|
||||
turns_per_move = 3
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "hits the"
|
||||
speed = 4
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 10
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
//Space carp aren't affected by atmos.
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
|
||||
environment_smash = 1
|
||||
|
||||
faction = "scarybat"
|
||||
var/mob/living/owner
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/New(loc, mob/living/L as mob)
|
||||
..()
|
||||
if(istype(L))
|
||||
owner = L
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/Process_Spacemove(var/check_drift = 0)
|
||||
return ..() //No drifting in space for space carp! //original comments do not steal
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/FindTarget()
|
||||
. = ..()
|
||||
if(.)
|
||||
emote("flutters towards [.]")
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/Found(var/atom/A)//This is here as a potential override to pick a specific target if available
|
||||
if(istype(A) && A == owner)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/AttackingTarget()
|
||||
. =..()
|
||||
var/mob/living/L = .
|
||||
if(istype(L))
|
||||
if(prob(15))
|
||||
L.Stun(1)
|
||||
L.visible_message("<span class='danger'>\the [src] scares \the [L]!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/cult
|
||||
faction = "cult"
|
||||
supernatural = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/cult/cultify()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/scarybat/cult/Life()
|
||||
..()
|
||||
check_horde()
|
||||
@@ -13,4 +13,26 @@
|
||||
attacktext = "chomped"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
faction = "creature"
|
||||
speed = 4
|
||||
speed = 4
|
||||
|
||||
/mob/living/simple_animal/hostile/creature/cult
|
||||
faction = "cult"
|
||||
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
|
||||
supernatural = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/creature/cult/cultify()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/creature/cult/Life()
|
||||
..()
|
||||
check_horde()
|
||||
|
||||
@@ -47,3 +47,13 @@
|
||||
if(prob(12))
|
||||
L.Weaken(3)
|
||||
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/cult
|
||||
faction = "cult"
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/cult/cultify()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/cult/Life()
|
||||
..()
|
||||
check_horde()
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
stop_automated_movement_when_pulled = 0
|
||||
var/destroy_surroundings = 1
|
||||
|
||||
var/shuttletarget = null
|
||||
var/enroute = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/FindTarget()
|
||||
|
||||
var/atom/T = null
|
||||
@@ -113,11 +116,11 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/ListTargets(var/dist = 7)
|
||||
var/list/L = hearers(src, dist)
|
||||
|
||||
|
||||
for (var/obj/mecha/M in mechas_list)
|
||||
if (get_dist(src, M) <= dist)
|
||||
L += M
|
||||
|
||||
|
||||
return L
|
||||
|
||||
/mob/living/simple_animal/hostile/death()
|
||||
@@ -206,3 +209,40 @@
|
||||
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/check_horde()
|
||||
if(emergency_shuttle.shuttle.location)
|
||||
if(!enroute && !target_mob) //The shuttle docked, all monsters rush for the escape hallway
|
||||
if(!shuttletarget || (get_dist(src, shuttletarget) >= 2))
|
||||
shuttletarget = pick(escape_list)
|
||||
enroute = 1
|
||||
stop_automated_movement = 1
|
||||
spawn()
|
||||
if(!src.stat)
|
||||
horde()
|
||||
|
||||
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
|
||||
enroute = 0
|
||||
stop_automated_movement = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/horde()
|
||||
var/turf/T = get_step_to(src, shuttletarget)
|
||||
for(var/atom/A in T)
|
||||
if(istype(A,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/D = A
|
||||
D.open(1)
|
||||
else if(istype(A,/obj/structure/mineral_door))
|
||||
var/obj/structure/mineral_door/D = A
|
||||
if(D.density)
|
||||
D.Open()
|
||||
else if(istype(A,/obj/structure/cult/pylon))
|
||||
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
|
||||
else if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/table/rack))
|
||||
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
|
||||
Move(T)
|
||||
FindTarget()
|
||||
if(!target_mob || enroute)
|
||||
spawn(10)
|
||||
if(!src.stat)
|
||||
horde()
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
var/maxbodytemp = 350
|
||||
var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp
|
||||
var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
|
||||
var/fire_alert = 0
|
||||
|
||||
//Atmos effect - Yes, you can make creatures that require phoron or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
|
||||
var/min_oxy = 5
|
||||
@@ -78,6 +79,7 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
..()
|
||||
|
||||
//Health
|
||||
if(stat == DEAD)
|
||||
@@ -191,9 +193,13 @@
|
||||
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
fire_alert = 2
|
||||
adjustBruteLoss(cold_damage_per_tick)
|
||||
else if(bodytemperature > maxbodytemp)
|
||||
fire_alert = 1
|
||||
adjustBruteLoss(heat_damage_per_tick)
|
||||
else
|
||||
fire_alert = 0
|
||||
|
||||
if(!atmos_suitable)
|
||||
adjustBruteLoss(unsuitable_atoms_damage)
|
||||
@@ -313,10 +319,10 @@
|
||||
if(statpanel("Status") && show_stat_health)
|
||||
stat(null, "Health: [round((health / maxHealth) * 100)]%")
|
||||
|
||||
/mob/living/simple_animal/death()
|
||||
/mob/living/simple_animal/death(gibbed, deathmessage="")
|
||||
icon_state = icon_dead
|
||||
density = 0
|
||||
return ..(deathmessage = "no message")
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity)
|
||||
if(!blinded)
|
||||
|
||||
@@ -87,6 +87,8 @@
|
||||
var/lying = 0
|
||||
var/lying_prev = 0
|
||||
var/canmove = 1
|
||||
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
|
||||
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
|
||||
var/lastpuke = 0
|
||||
var/unacidable = 0
|
||||
var/small = 0
|
||||
|
||||
@@ -170,17 +170,19 @@
|
||||
|
||||
|
||||
/client/Move(n, direct)
|
||||
if(!mob)
|
||||
return // Moved here to avoid nullrefs below
|
||||
|
||||
if(mob.control_object) Move_object(direct)
|
||||
|
||||
if(isobserver(mob)) return mob.Move(n,direct)
|
||||
if(mob.incorporeal_move)
|
||||
Process_Incorpmove(direct)
|
||||
return
|
||||
|
||||
if(moving) return 0
|
||||
|
||||
if(world.time < move_delay) return
|
||||
|
||||
if(!mob) return
|
||||
|
||||
if(locate(/obj/effect/stop/, mob.loc))
|
||||
for(var/obj/effect/stop/S in mob.loc)
|
||||
if(S.victim == mob)
|
||||
@@ -364,13 +366,15 @@
|
||||
///Allows mobs to run though walls
|
||||
/client/proc/Process_Incorpmove(direct)
|
||||
var/turf/mobloc = get_turf(mob)
|
||||
if(!isliving(mob))
|
||||
return
|
||||
var/mob/living/L = mob
|
||||
switch(L.incorporeal_move)
|
||||
|
||||
switch(mob.incorporeal_move)
|
||||
if(1)
|
||||
L.loc = get_step(L, direct)
|
||||
L.dir = direct
|
||||
var/turf/T = get_step(mob, direct)
|
||||
if(mob.check_holy(T))
|
||||
mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>"
|
||||
else
|
||||
mob.loc = get_step(mob, direct)
|
||||
mob.dir = direct
|
||||
if(2)
|
||||
if(prob(50))
|
||||
var/locx
|
||||
@@ -398,21 +402,35 @@
|
||||
return
|
||||
else
|
||||
return
|
||||
L.loc = locate(locx,locy,mobloc.z)
|
||||
mob.loc = locate(locx,locy,mobloc.z)
|
||||
spawn(0)
|
||||
var/limit = 2//For only two trailing shadows.
|
||||
for(var/turf/T in getline(mobloc, L.loc))
|
||||
for(var/turf/T in getline(mobloc, mob.loc))
|
||||
spawn(0)
|
||||
anim(T,L,'icons/mob/mob.dmi',,"shadow",,L.dir)
|
||||
anim(T,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
|
||||
limit--
|
||||
if(limit<=0) break
|
||||
else
|
||||
spawn(0)
|
||||
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,L.dir)
|
||||
L.loc = get_step(L, direct)
|
||||
L.dir = direct
|
||||
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
|
||||
mob.loc = get_step(mob, direct)
|
||||
mob.dir = direct
|
||||
// Crossed is always a bit iffy
|
||||
for(var/obj/S in mob.loc)
|
||||
if(istype(S,/obj/effect/step_trigger) || istype(S,/obj/effect/beam))
|
||||
S.Crossed(mob)
|
||||
|
||||
var/area/A = get_area_master(mob)
|
||||
if(A)
|
||||
A.Entered(mob)
|
||||
if(isturf(mob.loc))
|
||||
var/turf/T = mob.loc
|
||||
T.Entered(mob)
|
||||
mob.Post_Incorpmove()
|
||||
return 1
|
||||
|
||||
/mob/proc/Post_Incorpmove()
|
||||
return
|
||||
|
||||
///Process_Spacemove
|
||||
///Called by /client/Move()
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
#define I_SINGULO "singulo"
|
||||
|
||||
/atom/proc/singularity_act()
|
||||
return
|
||||
|
||||
/atom/proc/singularity_pull()
|
||||
return
|
||||
|
||||
/mob/living/singularity_act()
|
||||
investigate_log("has been consumed by a singularity", I_SINGULO)
|
||||
gib()
|
||||
return 20
|
||||
|
||||
/mob/living/singularity_pull(S)
|
||||
step_towards(src, S)
|
||||
|
||||
/mob/living/carbon/human/singularity_act()
|
||||
var/gain = 20
|
||||
if(mind)
|
||||
if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer"))
|
||||
gain = 100
|
||||
if(mind.assigned_role == "Assistant")
|
||||
gain = rand(0, 300)
|
||||
investigate_log(I_SINGULO,"has been consumed by a singularity", I_SINGULO)
|
||||
gib()
|
||||
return gain
|
||||
|
||||
/mob/living/carbon/human/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_THREE)
|
||||
var/list/handlist = list(l_hand, r_hand)
|
||||
for(var/obj/item/hand in handlist)
|
||||
if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && u_equip(hand))
|
||||
step_towards(hand, src)
|
||||
src << "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>"
|
||||
apply_effect(current_size * 3, IRRADIATE)
|
||||
if(shoes)
|
||||
if(shoes.flags & NOSLIP) return 0
|
||||
..()
|
||||
|
||||
/obj/singularity_act()
|
||||
ex_act(1)
|
||||
if(src)
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return 2
|
||||
|
||||
/obj/singularity_pull(S, current_size)
|
||||
if(anchored)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
step_towards(src, S)
|
||||
else
|
||||
step_towards(src, S)
|
||||
|
||||
/obj/effect/beam/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/overlay/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/item/singularity_pull(S, current_size)
|
||||
spawn(0) //this is needed or multiple items will be thrown sequentially and not simultaneously
|
||||
if(current_size >= STAGE_FOUR)
|
||||
//throw_at(S, 14, 3)
|
||||
step_towards(src,S)
|
||||
sleep(1)
|
||||
step_towards(src,S)
|
||||
else if(current_size > STAGE_ONE)
|
||||
step_towards(src,S)
|
||||
else ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter/shard/singularity_act()
|
||||
qdel(src)
|
||||
return 5000
|
||||
|
||||
/obj/machinery/power/supermatter/singularity_act()
|
||||
var/prints = ""
|
||||
if(src.fingerprintshidden)
|
||||
prints = ", all touchers : " + src.fingerprintshidden
|
||||
|
||||
SetUniversalState(/datum/universal_state/supermatter_cascade)
|
||||
log_admin("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].")
|
||||
message_admins("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].")
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return 50000
|
||||
|
||||
/obj/item/projectile/beam/emitter/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/backpack/holding/singularity_act(S, current_size)
|
||||
var/dist = max((current_size - 2), 1)
|
||||
explosion(src.loc,(dist),(dist*2),(dist*4))
|
||||
return 1000
|
||||
|
||||
/turf/singularity_act(S, current_size)
|
||||
if(intact)
|
||||
for(var/obj/O in contents)
|
||||
if(O.level != 1)
|
||||
continue
|
||||
if(O.invisibility == 101)
|
||||
O.singularity_act(src, current_size)
|
||||
ChangeTurf(/turf/space)
|
||||
return 2
|
||||
|
||||
/turf/simulated/wall/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(75))
|
||||
dismantle_wall()
|
||||
return
|
||||
if(current_size == STAGE_FOUR)
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
|
||||
/turf/simulated/wall/r_wall/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
|
||||
/turf/space/singularity_act()
|
||||
return
|
||||
|
||||
/*******************
|
||||
* Nar-Sie Act/Pull *
|
||||
*******************/
|
||||
/atom/proc/singuloCanEat()
|
||||
return 1
|
||||
|
||||
/mob/dead/singuloCanEat()
|
||||
return 0
|
||||
|
||||
/mob/eye/singuloCanEat()
|
||||
return 0
|
||||
|
||||
/mob/new_player/singuloCanEat()
|
||||
return 0
|
||||
@@ -1,4 +1,4 @@
|
||||
/area/engineering/power_alert(var/alarming)
|
||||
if (alarming)
|
||||
investigate_log("has a power alarm!","singulo")
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -1,90 +1,285 @@
|
||||
var/global/narsie_behaviour = "CultStation13"
|
||||
var/global/narsie_cometh = 0
|
||||
var/global/list/narsie_list = list()
|
||||
|
||||
/obj/machinery/singularity/narsie //Moving narsie to a child object of the singularity so it can be made to function differently. --NEO
|
||||
/obj/machinery/singularity/narsie //Moving narsie to its own file for the sake of being clearer
|
||||
name = "Nar-Sie"
|
||||
desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees."
|
||||
icon = 'icons/obj/magic_terror.dmi'
|
||||
pixel_x = -89
|
||||
pixel_y = -85
|
||||
current_size = 9 //It moves/eats like a max-size singulo, aside from range. --NEO
|
||||
contained = 0 //Are we going to move around?
|
||||
dissipate = 0 //Do we lose energy over time?
|
||||
move_self = 1 //Do we move on our own?
|
||||
icon = 'icons/obj/narsie.dmi'
|
||||
icon_state = "narsie-small"
|
||||
pixel_x = -236
|
||||
pixel_y = -256
|
||||
|
||||
current_size = 9 //It moves/eats like a max-size singulo, aside from range. --NEO.
|
||||
contained = 0 // Are we going to move around?
|
||||
dissipate = 0 // Do we lose energy over time?
|
||||
grav_pull = 10 //How many tiles out do we pull?
|
||||
consume_range = 3 //How many tiles out do we eat
|
||||
var/last_boom = 0
|
||||
|
||||
|
||||
/obj/machinery/singularity/narsie/New()
|
||||
..()
|
||||
narsie_list.Add(src)
|
||||
|
||||
/obj/machinery/singularity/narsie/Destroy()
|
||||
narsie_list.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/singularity/narsie/large
|
||||
name = "Nar-Sie"
|
||||
icon = 'icons/obj/narsie.dmi'
|
||||
icon_state = "narsie"//mobs perceive the geometer of blood through their see_narsie proc
|
||||
|
||||
// Pixel stuff centers Narsie.
|
||||
pixel_x = -236
|
||||
pixel_y = -256
|
||||
luminosity = 1
|
||||
l_color = "#3e0000"
|
||||
|
||||
current_size = 12
|
||||
move_self = 1 //Do we move on our own?
|
||||
consume_range = 12 //How many tiles out do we eat
|
||||
consume_range = 12 // How many tiles out do we eat.
|
||||
var/announce=1
|
||||
var/narnar = 1
|
||||
|
||||
/obj/machinery/singularity/narsie/large/New()
|
||||
..()
|
||||
narsie_list.Add(src)
|
||||
world << "<font size='28' color='red'><b>NAR-SIE HAS RISEN</b></font>"
|
||||
if(announce)
|
||||
world << "<font size='15' color='red'><b>[uppertext(name)] HAS RISEN</b></font>"
|
||||
world << sound('sound/effects/wind/wind_5_1.ogg')
|
||||
|
||||
if(emergency_shuttle && emergency_shuttle.can_call())
|
||||
emergency_shuttle.call_evac()
|
||||
emergency_shuttle.launch_time = 0 // Cannot recall
|
||||
|
||||
/obj/machinery/singularity/narsie/large/Destroy()
|
||||
narsie_list.Remove(src)
|
||||
..()
|
||||
if(narnar)
|
||||
SetUniversalState(/datum/universal_state/hell)
|
||||
narsie_cometh = 1
|
||||
|
||||
/obj/machinery/singularity/narsie/process()
|
||||
eat()
|
||||
if(!target || prob(5))
|
||||
|
||||
if (!target || prob(5))
|
||||
pickcultist()
|
||||
|
||||
move()
|
||||
if(prob(25))
|
||||
|
||||
if (prob(25))
|
||||
mezzer()
|
||||
|
||||
/obj/machinery/singularity/narsie/consume(var/atom/A) //Has its own consume proc because it doesn't need energy and I don't want BoHs to explode it. --NEO
|
||||
if(is_type_in_list(A, uneatable))
|
||||
return 0
|
||||
if (istype(A,/mob/living))//Mobs get gibbed
|
||||
A:gib()
|
||||
else if(istype(A,/obj))
|
||||
var/obj/O = A
|
||||
machines -= O
|
||||
processing_objects -= O
|
||||
O.loc = null
|
||||
else if(isturf(A))
|
||||
var/turf/T = A
|
||||
if(T.intact)
|
||||
for(var/obj/O in T.contents)
|
||||
if(O.level != 1)
|
||||
continue
|
||||
if(O.invisibility == 101)
|
||||
src.consume(O)
|
||||
A:ChangeTurf(/turf/space)
|
||||
if(last_boom + 100 < world.time && prob(5))
|
||||
explosion(loc, -1, -1, -1, 1, 0) //Since we're not exploding everything in consume() toss out an explosion effect every now and again
|
||||
last_boom = world.time
|
||||
return
|
||||
/obj/machinery/singularity/narsie/large/eat()
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
/obj/machinery/singularity/narsie/ex_act() //No throwing bombs at it either. --NEO
|
||||
for (var/turf/A in orange(consume_range, src))
|
||||
consume(A)
|
||||
|
||||
/obj/machinery/singularity/narsie/mezzer()
|
||||
for(var/mob/living/carbon/M in oviewers(8, src))
|
||||
if(M.stat == CONSCIOUS)
|
||||
if(M.status_flags & GODMODE)
|
||||
continue
|
||||
if(!iscultist(M))
|
||||
M << "<span class='danger'> You feel your sanity crumble away in an instant as you gaze upon [src.name]...</span>"
|
||||
M.apply_effect(3, STUN)
|
||||
|
||||
|
||||
/obj/machinery/singularity/narsie/large/Bump(atom/A)
|
||||
if(!narnar) return
|
||||
if(isturf(A))
|
||||
narsiewall(A)
|
||||
else if(istype(A, /obj/structure/cult))
|
||||
qdel(A)
|
||||
|
||||
/obj/machinery/singularity/narsie/large/Bumped(atom/A)
|
||||
if(!narnar) return
|
||||
if(isturf(A))
|
||||
narsiewall(A)
|
||||
else if(istype(A, /obj/structure/cult))
|
||||
qdel(A)
|
||||
|
||||
/obj/machinery/singularity/narsie/move(var/force_move = 0)
|
||||
if(!move_self)
|
||||
return 0
|
||||
|
||||
var/movement_dir = pick(alldirs - last_failed_movement)
|
||||
|
||||
if(force_move)
|
||||
movement_dir = force_move
|
||||
|
||||
if(target && prob(60))
|
||||
movement_dir = get_dir(src,target)
|
||||
|
||||
spawn(0)
|
||||
step(src, movement_dir)
|
||||
spawn(1)
|
||||
step(src, movement_dir)
|
||||
return 1
|
||||
|
||||
/obj/machinery/singularity/narsie/large/move(var/force_move = 0)
|
||||
if(!move_self)
|
||||
return 0
|
||||
|
||||
var/movement_dir = pick(alldirs - last_failed_movement)
|
||||
|
||||
if(force_move)
|
||||
movement_dir = force_move
|
||||
|
||||
if(target && prob(60))
|
||||
movement_dir = get_dir(src,target)
|
||||
spawn(0)
|
||||
step(src, movement_dir)
|
||||
narsiefloor(get_turf(loc))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
M.see_narsie(src,movement_dir)
|
||||
spawn(10)
|
||||
step(src, movement_dir)
|
||||
narsiefloor(get_turf(loc))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
M.see_narsie(src,movement_dir)
|
||||
return 1
|
||||
|
||||
/obj/machinery/singularity/narsie/proc/narsiefloor(var/turf/T)//leaving "footprints"
|
||||
if(!(istype(T, /turf/simulated/wall/cult)||istype(T, /turf/space)))
|
||||
if(T.icon_state != "cult-narsie")
|
||||
T.desc = "something that goes beyond your understanding went this way"
|
||||
T.icon_state = "cult-narsie"
|
||||
T.luminosity = 1
|
||||
|
||||
/obj/machinery/singularity/narsie/proc/narsiewall(var/turf/T)
|
||||
T.desc = "An opening has been made on that wall, but who can say if what you seek truly lies on the other side?"
|
||||
T.icon = 'icons/turf/walls.dmi'
|
||||
T.icon_state = "cult-narsie"
|
||||
T.opacity = 0
|
||||
T.density = 0
|
||||
luminosity = 1
|
||||
|
||||
/obj/machinery/singularity/narsie/large/consume(const/atom/A) //Has its own consume proc because it doesn't need energy and I don't want BoHs to explode it. --NEO
|
||||
//NEW BEHAVIOUR
|
||||
if(narsie_behaviour == "CultStation13")
|
||||
//MOB PROCESSING
|
||||
new_narsie(A)
|
||||
|
||||
//OLD BEHAVIOUR
|
||||
else if(narsie_behaviour == "Nar-Singulo")
|
||||
old_narsie(A)
|
||||
|
||||
/obj/machinery/singularity/narsie/proc/new_narsie(const/atom/A)
|
||||
if (istype(A, /mob/) && (get_dist(A, src) <= 7))
|
||||
var/mob/M = A
|
||||
|
||||
if(M.status_flags & GODMODE)
|
||||
return 0
|
||||
|
||||
M.cultify()
|
||||
|
||||
//ITEM PROCESSING
|
||||
else if (istype(A, /obj/))
|
||||
var/obj/O = A
|
||||
O.cultify()
|
||||
|
||||
//TURF PROCESSING
|
||||
else if (isturf(A))
|
||||
var/dist = get_dist(A, src)
|
||||
|
||||
for (var/atom/movable/AM in A.contents)
|
||||
if (dist <= consume_range)
|
||||
consume(AM)
|
||||
continue
|
||||
|
||||
if (dist <= consume_range && !istype(A, /turf/space))
|
||||
var/turf/T = A
|
||||
if(T.holy)
|
||||
T.holy = 0 //Nar-Sie doesn't give a shit about sacred grounds.
|
||||
T.cultify()
|
||||
|
||||
/obj/machinery/singularity/narsie/proc/old_narsie(const/atom/A)
|
||||
if(!(A.singuloCanEat()))
|
||||
return 0
|
||||
|
||||
if (istype(A, /mob/living/))
|
||||
var/mob/living/C2 = A
|
||||
|
||||
if(C2.status_flags & GODMODE)
|
||||
return 0
|
||||
|
||||
C2.dust() // Changed from gib(), just for less lag.
|
||||
|
||||
else if (istype(A, /obj/))
|
||||
qdel(A)
|
||||
|
||||
if (A)
|
||||
qdel(A)
|
||||
else if (isturf(A))
|
||||
var/dist = get_dist(A, src)
|
||||
|
||||
for (var/atom/movable/AM2 in A.contents)
|
||||
if (AM2 == src) // This is the snowflake.
|
||||
continue
|
||||
|
||||
if (dist <= consume_range)
|
||||
consume(AM2)
|
||||
continue
|
||||
|
||||
if (dist <= consume_range && !istype(A, /turf/space))
|
||||
var/turf/T2 = A
|
||||
T2.ChangeTurf(/turf/space)
|
||||
|
||||
/obj/machinery/singularity/narsie/consume(const/atom/A) //This one is for the small ones.
|
||||
if(!(A.singuloCanEat()))
|
||||
return 0
|
||||
|
||||
if (istype(A, /mob/living/))
|
||||
var/mob/living/C2 = A
|
||||
|
||||
if(C2.status_flags & GODMODE)
|
||||
return 0
|
||||
|
||||
C2.dust() // Changed from gib(), just for less lag.
|
||||
|
||||
else if (istype(A, /obj/))
|
||||
qdel(A)
|
||||
|
||||
if (A)
|
||||
qdel(A)
|
||||
else if (isturf(A))
|
||||
var/dist = get_dist(A, src)
|
||||
|
||||
for (var/atom/movable/AM2 in A.contents)
|
||||
if (AM2 == src) // This is the snowflake.
|
||||
continue
|
||||
|
||||
if (dist <= consume_range)
|
||||
consume(AM2)
|
||||
continue
|
||||
|
||||
if (dist > consume_range)
|
||||
if(!(AM2.singuloCanEat()))
|
||||
continue
|
||||
|
||||
if (101 == AM2.invisibility)
|
||||
continue
|
||||
|
||||
spawn (0)
|
||||
AM2.singularity_pull(src, src.current_size)
|
||||
|
||||
if (dist <= consume_range && !istype(A, /turf/space))
|
||||
var/turf/T2 = A
|
||||
T2.ChangeTurf(/turf/space)
|
||||
|
||||
/obj/machinery/singularity/narsie/ex_act(severity) //No throwing bombs at it either. --NEO
|
||||
return
|
||||
|
||||
/obj/machinery/singularity/narsie/proc/pickcultist() //Narsie rewards his cultists with being devoured first, then picks a ghost to follow. --NEO
|
||||
var/list/cultists = list()
|
||||
if(cult && cult.current_antagonists.len)
|
||||
for(var/datum/mind/cult_nh_mind in cult.current_antagonists)
|
||||
if(!cult_nh_mind.current)
|
||||
continue
|
||||
if(cult_nh_mind.current.stat)
|
||||
continue
|
||||
var/turf/pos = get_turf(cult_nh_mind.current)
|
||||
if(pos.z != src.z)
|
||||
continue
|
||||
cultists += cult_nh_mind.current
|
||||
for(var/datum/mind/cult_nh_mind in cult.current_antagonists)
|
||||
if(!cult_nh_mind.current)
|
||||
continue
|
||||
if(cult_nh_mind.current.stat)
|
||||
continue
|
||||
var/turf/pos = get_turf(cult_nh_mind.current)
|
||||
if(pos.z != src.z)
|
||||
continue
|
||||
cultists += cult_nh_mind.current
|
||||
if(cultists.len)
|
||||
acquire(pick(cultists))
|
||||
return
|
||||
@@ -112,22 +307,51 @@ var/global/list/narsie_list = list()
|
||||
return
|
||||
//no living humans, follow a ghost instead.
|
||||
|
||||
/obj/machinery/singularity/narsie/proc/acquire(var/mob/food)
|
||||
target << "\blue <b>NAR-SIE HAS LOST INTEREST IN YOU</b>"
|
||||
/obj/machinery/singularity/narsie/proc/acquire(const/mob/food)
|
||||
var/capname = uppertext(name)
|
||||
|
||||
target << "<span class='notice'><b>[capname] HAS LOST INTEREST IN YOU.</b></span>"
|
||||
target = food
|
||||
if(ishuman(target))
|
||||
target << "\red <b>NAR-SIE HUNGERS FOR YOUR SOUL</b>"
|
||||
|
||||
if (ishuman(target))
|
||||
target << "<span class='danger'>[capname] HUNGERS FOR YOUR SOUL.</span>"
|
||||
else
|
||||
target << "\red <b>NAR-SIE HAS CHOSEN YOU TO LEAD HIM TO HIS NEXT MEAL</b>"
|
||||
target << "<span class='danger'>[capname] HAS CHOSEN YOU TO LEAD HIM TO HIS NEXT MEAL.</span>"
|
||||
|
||||
//Wizard narsie
|
||||
/obj/machinery/singularity/narsie/on_capture()
|
||||
chained = 1
|
||||
move_self = 0
|
||||
icon_state ="narsie-small-chains"
|
||||
|
||||
/obj/machinery/singularity/narsie/on_release()
|
||||
chained = 0
|
||||
move_self = 1
|
||||
icon_state ="narsie-small"
|
||||
|
||||
/obj/machinery/singularity/narsie/large/on_capture()
|
||||
chained = 1
|
||||
move_self = 0
|
||||
icon_state ="narsie-chains"
|
||||
for(var/mob/M in mob_list)//removing the client image of nar-sie while it is chained
|
||||
if(M.client)
|
||||
M.see_narsie(src)
|
||||
|
||||
/obj/machinery/singularity/narsie/large/on_release()
|
||||
chained = 0
|
||||
move_self = 1
|
||||
icon_state ="narsie"
|
||||
|
||||
/obj/machinery/singularity/narsie/cultify()
|
||||
return
|
||||
|
||||
/**
|
||||
* Wizard narsie.
|
||||
*/
|
||||
/obj/machinery/singularity/narsie/wizard
|
||||
grav_pull = 0
|
||||
|
||||
/obj/machinery/singularity/narsie/wizard/eat()
|
||||
set background = 1
|
||||
for(var/atom/X in orange(consume_range,src))
|
||||
if(isturf(X) || istype(X, /atom/movable))
|
||||
consume(X)
|
||||
return
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
for (var/turf/T in trange(consume_range, src))
|
||||
consume(T)
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
var/global/list/uneatable = list(
|
||||
/turf/space,
|
||||
/obj/effect/overlay
|
||||
)
|
||||
|
||||
/obj/machinery/singularity/
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
@@ -16,6 +11,7 @@ var/global/list/uneatable = list(
|
||||
luminosity = 6
|
||||
unacidable = 1 //Don't comment this out.
|
||||
use_power = 0
|
||||
|
||||
var/current_size = 1
|
||||
var/allowed_size = 1
|
||||
var/contained = 1 //Are we going to move around?
|
||||
@@ -26,102 +22,108 @@ var/global/list/uneatable = list(
|
||||
var/dissipate_strength = 1 //How much energy do we lose?
|
||||
var/move_self = 1 //Do we move on our own?
|
||||
var/grav_pull = 4 //How many tiles out do we pull?
|
||||
var/consume_range = 0 //How many tiles out do we eat
|
||||
var/event_chance = 15 //Prob for event each tick
|
||||
var/target = null //its target. moves towards the target if it has one
|
||||
var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing
|
||||
var/teleport_del = 0
|
||||
var/consume_range = 0 //How many tiles out do we eat.
|
||||
var/event_chance = 15 //Prob for event each tick.
|
||||
var/target = null //Its target. Moves towards the target if it has one.
|
||||
var/last_failed_movement = 0 //Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing.
|
||||
var/last_warning
|
||||
|
||||
var/chained = 0//Adminbus chain-grab
|
||||
|
||||
/obj/machinery/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
|
||||
//CARN: admin-alert for chuckle-fuckery.
|
||||
admin_investigate_setup()
|
||||
energy = starting_energy
|
||||
|
||||
if (temp)
|
||||
spawn (temp)
|
||||
qdel(src)
|
||||
|
||||
src.energy = starting_energy
|
||||
if(temp)
|
||||
spawn(temp)
|
||||
del(src)
|
||||
..()
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)
|
||||
if(singubeacon.active)
|
||||
target = singubeacon
|
||||
break
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/singularity/attack_hand(mob/user as mob)
|
||||
consume(user)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/singularity/blob_act(severity)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/singularity/ex_act(severity)
|
||||
if(current_size == STAGE_SUPER)//IT'S UNSTOPPABLE
|
||||
return
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(prob(25))
|
||||
del(src)
|
||||
investigate_log("has been destroyed by an explosion.", I_SINGULO)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
energy += 50
|
||||
if(2.0 to 3.0)
|
||||
energy += round((rand(20,60)/2),1)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/singularity/bullet_act(obj/item/projectile/P)
|
||||
return 0 //Will there be an impact? Who knows. Will we see it? No.
|
||||
|
||||
/obj/machinery/singularity/Bump(atom/A)
|
||||
consume(A)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/singularity/Bumped(atom/A)
|
||||
consume(A)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/singularity/process()
|
||||
eat()
|
||||
dissipate()
|
||||
check_energy()
|
||||
|
||||
if(current_size >= 3)
|
||||
if (current_size >= STAGE_THREE)
|
||||
move()
|
||||
pulse()
|
||||
if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit
|
||||
|
||||
if (prob(event_chance)) //Chance for it to run a special event TODO: Come up with one or two more that fit.
|
||||
event()
|
||||
|
||||
/obj/machinery/singularity/attack_ai() //To prevent ais from gibbing themselves when they click on one.
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/singularity/attack_ai() //to prevent ais from gibbing themselves when they click on one.
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/singularity/proc/admin_investigate_setup()
|
||||
last_warning = world.time
|
||||
var/count = locate(/obj/machinery/containment_field) in orange(30, src)
|
||||
if(!count) message_admins("A singulo has been created without containment fields active ([x],[y],[z])",1)
|
||||
investigate_log("was created. [count?"":"<font color='red'>No containment fields were active</font>"]","singulo")
|
||||
|
||||
if (!count)
|
||||
message_admins("A singulo has been created without containment fields active ([x], [y], [z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>).")
|
||||
|
||||
investigate_log("was created. [count ? "" : "<font color='red'>No containment fields were active.</font>"]", I_SINGULO)
|
||||
|
||||
/obj/machinery/singularity/proc/dissipate()
|
||||
if(!dissipate)
|
||||
if (!dissipate)
|
||||
return
|
||||
|
||||
if(dissipate_track >= dissipate_delay)
|
||||
src.energy -= dissipate_strength
|
||||
energy -= dissipate_strength
|
||||
dissipate_track = 0
|
||||
else
|
||||
dissipate_track++
|
||||
|
||||
/obj/machinery/singularity/proc/expand(var/force_size = 0, var/growing = 1)
|
||||
if(current_size == STAGE_SUPER)//if this is happening, this is an error
|
||||
message_admins("expand() was called on a super singulo. This should not happen. Contact a coder immediately!")
|
||||
return
|
||||
var/temp_allowed_size = allowed_size
|
||||
|
||||
/obj/machinery/singularity/proc/expand(var/force_size = 0)
|
||||
var/temp_allowed_size = src.allowed_size
|
||||
if(force_size)
|
||||
if (force_size)
|
||||
temp_allowed_size = force_size
|
||||
switch(temp_allowed_size)
|
||||
if(1)
|
||||
current_size = 1
|
||||
|
||||
switch (temp_allowed_size)
|
||||
if (STAGE_ONE)
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
current_size = STAGE_ONE
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "singularity_s1"
|
||||
pixel_x = 0
|
||||
@@ -131,8 +133,14 @@ var/global/list/uneatable = list(
|
||||
dissipate_delay = 10
|
||||
dissipate_track = 0
|
||||
dissipate_strength = 1
|
||||
if(3)//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 = 3
|
||||
overlays = 0
|
||||
if(chained)
|
||||
overlays = "chain_s1"
|
||||
visible_message("<span class='notice'>The singularity has shrunk to a rather pitiful size.</span>")
|
||||
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.
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
current_size = STAGE_TWO
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "singularity_s3"
|
||||
pixel_x = -32
|
||||
@@ -142,9 +150,18 @@ var/global/list/uneatable = list(
|
||||
dissipate_delay = 5
|
||||
dissipate_track = 0
|
||||
dissipate_strength = 5
|
||||
if(5)
|
||||
if((check_turfs_in(1,2))&&(check_turfs_in(2,2))&&(check_turfs_in(4,2))&&(check_turfs_in(8,2)))
|
||||
current_size = 5
|
||||
overlays = 0
|
||||
if(chained)
|
||||
overlays = "chain_s3"
|
||||
if(growing)
|
||||
visible_message("<span class='notice'>The singularity noticeably grows in size.</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>The singularity has shrunk to a less powerful size.</span>")
|
||||
if (STAGE_THREE)
|
||||
if ((check_turfs_in(1, 2)) && (check_turfs_in(2, 2)) && (check_turfs_in(4, 2)) && (check_turfs_in(8, 2)))
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
current_size = STAGE_THREE
|
||||
icon = 'icons/effects/160x160.dmi'
|
||||
icon_state = "singularity_s5"
|
||||
pixel_x = -64
|
||||
@@ -154,9 +171,18 @@ var/global/list/uneatable = list(
|
||||
dissipate_delay = 4
|
||||
dissipate_track = 0
|
||||
dissipate_strength = 20
|
||||
if(7)
|
||||
if((check_turfs_in(1,3))&&(check_turfs_in(2,3))&&(check_turfs_in(4,3))&&(check_turfs_in(8,3)))
|
||||
current_size = 7
|
||||
overlays = 0
|
||||
if(chained)
|
||||
overlays = "chain_s5"
|
||||
if(growing)
|
||||
visible_message("<span class='notice'>The singularity expands to a reasonable size.</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>The singularity has returned to a safe size.</span>")
|
||||
if(STAGE_FOUR)
|
||||
if ((check_turfs_in(1, 3)) && (check_turfs_in(2, 3)) && (check_turfs_in(4, 3)) && (check_turfs_in(8, 3)))
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
current_size = STAGE_FOUR
|
||||
icon = 'icons/effects/224x224.dmi'
|
||||
icon_state = "singularity_s7"
|
||||
pixel_x = -96
|
||||
@@ -166,123 +192,100 @@ var/global/list/uneatable = list(
|
||||
dissipate_delay = 10
|
||||
dissipate_track = 0
|
||||
dissipate_strength = 10
|
||||
if(9)//this one also lacks a check for gens because it eats everything
|
||||
current_size = 9
|
||||
overlays = 0
|
||||
if(chained)
|
||||
overlays = "chain_s7"
|
||||
if(growing)
|
||||
visible_message("<span class='warning'>The singularity expands to a dangerous size.</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>Miraculously, the singularity reduces in size, and can be contained.</span>")
|
||||
if(STAGE_FIVE) //This one also lacks a check for gens because it eats everything.
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
current_size = STAGE_FIVE
|
||||
icon = 'icons/effects/288x288.dmi'
|
||||
icon_state = "singularity_s9"
|
||||
pixel_x = -128
|
||||
pixel_y = -128
|
||||
grav_pull = 10
|
||||
consume_range = 4
|
||||
dissipate = 0 //It cant go smaller due to e loss.
|
||||
overlays = 0
|
||||
if(chained)
|
||||
overlays = "chain_s9"
|
||||
if(growing)
|
||||
visible_message("<span class='danger'><font size='2'>The singularity has grown out of control!</font></span>")
|
||||
else
|
||||
visible_message("<span class='warning'>The singularity miraculously reduces in size and loses its supermatter properties.</span>")
|
||||
if(STAGE_SUPER)//SUPERSINGULO
|
||||
name = "super gravitational singularity"
|
||||
desc = "A gravitational singularity with the properties of supermatter. <b>It has the power to destroy worlds.</b>"
|
||||
current_size = STAGE_SUPER
|
||||
icon = 'icons/effects/352x352.dmi'
|
||||
icon_state = "singularity_s11"//uh, whoever drew that, you know that black holes are supposed to look dark right? What's this, the clown's singulo?
|
||||
pixel_x = -160
|
||||
pixel_y = -160
|
||||
grav_pull = 16
|
||||
consume_range = 5
|
||||
dissipate = 0 //It cant go smaller due to e loss
|
||||
if(current_size == allowed_size)
|
||||
investigate_log("<font color='red'>grew to size [current_size]</font>","singulo")
|
||||
event_chance = 25 //Events will fire off more often.
|
||||
if(chained)
|
||||
overlays = "chain_s9"
|
||||
visible_message("<span class='sinister'><font size='3'>You witness the creation of a destructive force that cannot possibly be stopped by human hands.</font></span>")
|
||||
|
||||
if (current_size == allowed_size)
|
||||
investigate_log("<font color='red'>grew to size [current_size].</font>", I_SINGULO)
|
||||
return 1
|
||||
else if(current_size < (--temp_allowed_size))
|
||||
else if (current_size < (--temp_allowed_size) && current_size != STAGE_SUPER)
|
||||
expand(temp_allowed_size)
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/singularity/proc/check_energy()
|
||||
if(energy <= 0)
|
||||
del(src)
|
||||
if (energy <= 0)
|
||||
investigate_log("collapsed.", I_SINGULO)
|
||||
qdel(src)
|
||||
return 0
|
||||
switch(energy)//Some of these numbers might need to be changed up later -Mport
|
||||
if(1 to 199)
|
||||
allowed_size = 1
|
||||
if(200 to 499)
|
||||
allowed_size = 3
|
||||
if(500 to 999)
|
||||
allowed_size = 5
|
||||
if(1000 to 1999)
|
||||
allowed_size = 7
|
||||
if(2000 to INFINITY)
|
||||
allowed_size = 9
|
||||
if(current_size != allowed_size)
|
||||
expand()
|
||||
|
||||
switch (energy) //Some of these numbers might need to be changed up later -Mport.
|
||||
if (1 to 199)
|
||||
allowed_size = STAGE_ONE
|
||||
if (200 to 499)
|
||||
allowed_size = STAGE_TWO
|
||||
if (500 to 999)
|
||||
allowed_size = STAGE_THREE
|
||||
if (1000 to 1999)
|
||||
allowed_size = STAGE_FOUR
|
||||
if(2000 to 49999)
|
||||
allowed_size = STAGE_FIVE
|
||||
if(50000 to INFINITY)
|
||||
allowed_size = STAGE_SUPER
|
||||
|
||||
if (current_size != allowed_size && current_size != STAGE_SUPER)
|
||||
expand(null, current_size > allowed_size)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/singularity/proc/eat()
|
||||
set background = 1
|
||||
// Let's just make this one loop.
|
||||
for(var/atom/X in orange(grav_pull,src))
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
for(var/atom/X in orange(grav_pull, src))
|
||||
var/dist = get_dist(X, src)
|
||||
// Movable atoms only
|
||||
if(dist > consume_range && istype(X, /atom/movable))
|
||||
if(is_type_in_list(X, uneatable)) continue
|
||||
if(((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human)))|| (src.current_size >= 9))
|
||||
step_towards(X,src)
|
||||
else if(istype(X,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = X
|
||||
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
||||
if(M.magpulse)
|
||||
continue
|
||||
step_towards(H,src)
|
||||
// Turf and movable atoms
|
||||
else if(dist <= consume_range && (isturf(X) || istype(X, /atom/movable)))
|
||||
consume(X)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/singularity/proc/consume(var/atom/A)
|
||||
var/gain = 0
|
||||
if(is_type_in_list(A, uneatable))
|
||||
return 0
|
||||
if (istype(A,/mob/living))//Mobs get gibbed
|
||||
gain = 20
|
||||
if(istype(A,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.mind)
|
||||
|
||||
if((H.mind.assigned_role == "Station Engineer") || (H.mind.assigned_role == "Chief Engineer") )
|
||||
gain = 100
|
||||
|
||||
if(H.mind.assigned_role == "Clown")
|
||||
gain = rand(-300, 300) // HONK
|
||||
|
||||
spawn()
|
||||
A:gib()
|
||||
sleep(1)
|
||||
else if(istype(A,/obj/))
|
||||
|
||||
if (istype(A,/obj/item/weapon/storage/backpack/holding))
|
||||
var/dist = max((current_size - 2),1)
|
||||
explosion(src.loc,(dist),(dist*2),(dist*4))
|
||||
var/obj/machinery/singularity/S = src
|
||||
if(!istype(src))
|
||||
return
|
||||
if(dist > consume_range)
|
||||
X.singularity_pull(S, current_size)
|
||||
else if(dist <= consume_range)
|
||||
consume(X)
|
||||
|
||||
if(istype(A, /obj/machinery/singularity))//Welp now you did it
|
||||
var/obj/machinery/singularity/S = A
|
||||
src.energy += (S.energy/2)//Absorb most of it
|
||||
del(S)
|
||||
var/dist = max((current_size - 2),1)
|
||||
explosion(src.loc,(dist),(dist*2),(dist*4))
|
||||
return//Quits here, the obj should be gone, hell we might be
|
||||
//for (var/turf/T in trange(grav_pull, src)) //TODO: Create a similar trange for orange to prevent snowflake of self check.
|
||||
// consume(T)
|
||||
|
||||
if((teleport_del) && (!istype(A, /obj/machinery)))//Going to see if it does not lag less to tele items over to Z 2
|
||||
var/obj/O = A
|
||||
O.x = 2
|
||||
O.y = 2
|
||||
O.z = 2
|
||||
else
|
||||
A.ex_act(1.0)
|
||||
if(A) del(A)
|
||||
gain = 2
|
||||
else if(isturf(A))
|
||||
var/turf/T = A
|
||||
if(T.intact)
|
||||
for(var/obj/O in T.contents)
|
||||
if(O.level != 1)
|
||||
continue
|
||||
if(O.invisibility == 101)
|
||||
src.consume(O)
|
||||
T.ChangeTurf(/turf/space)
|
||||
gain = 2
|
||||
src.energy += gain
|
||||
return
|
||||
|
||||
/obj/machinery/singularity/proc/consume(const/atom/A)
|
||||
src.energy += A.singularity_act(src, current_size)
|
||||
return
|
||||
|
||||
/obj/machinery/singularity/proc/move(var/force_move = 0)
|
||||
if(!move_self)
|
||||
@@ -311,7 +314,6 @@ var/global/list/uneatable = list(
|
||||
last_failed_movement = movement_dir
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/singularity/proc/check_turfs_in(var/direction = 0, var/step = 0)
|
||||
if(!direction)
|
||||
return 0
|
||||
@@ -328,6 +330,8 @@ var/global/list/uneatable = list(
|
||||
steps = 4
|
||||
if(9)
|
||||
steps = 5
|
||||
if(11)
|
||||
steps = 6
|
||||
else
|
||||
steps = step
|
||||
var/list/turfs = list()
|
||||
@@ -364,34 +368,38 @@ var/global/list/uneatable = list(
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/singularity/proc/can_move(const/turf/T)
|
||||
if (!isturf(T))
|
||||
return 0
|
||||
|
||||
/obj/machinery/singularity/proc/can_move(var/turf/T)
|
||||
if(!T)
|
||||
if ((locate(/obj/machinery/containment_field) in T) || (locate(/obj/machinery/shieldwall) in T))
|
||||
return 0
|
||||
if((locate(/obj/machinery/containment_field) in T)||(locate(/obj/machinery/shieldwall) in T))
|
||||
return 0
|
||||
else if(locate(/obj/machinery/field_generator) in T)
|
||||
else if (locate(/obj/machinery/field_generator) in T)
|
||||
var/obj/machinery/field_generator/G = locate(/obj/machinery/field_generator) in T
|
||||
if(G && G.active)
|
||||
|
||||
if (G && G.active)
|
||||
return 0
|
||||
else if(locate(/obj/machinery/shieldwallgen) in T)
|
||||
else if (locate(/obj/machinery/shieldwallgen) in T)
|
||||
var/obj/machinery/shieldwallgen/S = locate(/obj/machinery/shieldwallgen) in T
|
||||
if(S && S.active)
|
||||
|
||||
if (S && S.active)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/singularity/proc/event()
|
||||
var/numb = pick(1,2,3,4,5,6)
|
||||
switch(numb)
|
||||
if(1)//EMP
|
||||
var/numb = pick(1, 2, 3, 4, 5, 6)
|
||||
|
||||
switch (numb)
|
||||
if (1) //EMP.
|
||||
emp_area()
|
||||
if(2,3)//tox damage all carbon mobs in area
|
||||
if (2, 3) //Tox damage all carbon mobs in area.
|
||||
toxmob()
|
||||
if(4)//Stun mobs who lack optic scanners
|
||||
if (4) //Stun mobs who lack optic scanners.
|
||||
mezzer()
|
||||
else
|
||||
return 0
|
||||
if(current_size == 11)
|
||||
smwave()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -405,6 +413,8 @@ var/global/list/uneatable = list(
|
||||
radiation = round(((src.energy-150)/50)*5,1)
|
||||
radiationmin = round((radiation/5),1)//
|
||||
for(var/mob/living/M in view(toxrange, src.loc))
|
||||
if(M.status_flags & GODMODE)
|
||||
continue
|
||||
M.apply_effect(rand(radiationmin,radiation), IRRADIATE)
|
||||
toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad")))
|
||||
M.apply_effect(toxdamage, TOX)
|
||||
@@ -415,28 +425,70 @@ var/global/list/uneatable = list(
|
||||
for(var/mob/living/carbon/M in oviewers(8, src))
|
||||
if(istype(M, /mob/living/carbon/brain)) //Ignore brains
|
||||
continue
|
||||
|
||||
if(M.status_flags & GODMODE)
|
||||
continue
|
||||
if(M.stat == CONSCIOUS)
|
||||
if (istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.glasses,/obj/item/clothing/glasses/meson))
|
||||
H << "\blue You look directly into The [src.name], good thing you had your protective eyewear on!"
|
||||
if(istype(H.glasses,/obj/item/clothing/glasses/meson) && current_size != 11)
|
||||
H << "<span class=\"notice\">You look directly into The [src.name], good thing you had your protective eyewear on!</span>"
|
||||
return
|
||||
M << "\red You look directly into The [src.name] and feel weak."
|
||||
else
|
||||
H << "<span class=\"warning\">You look directly into The [src.name], but your eyewear does absolutely nothing to protect you from it!</span>"
|
||||
M << "<span class='danger'>You look directly into The [src.name] and feel [current_size == 11 ? "helpless" : "weak"].</span>"
|
||||
M.apply_effect(3, STUN)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] stares blankly at The []!</B>", M, src), 1)
|
||||
return
|
||||
|
||||
O.show_message(text("<span class='danger'>[] stares blankly at The []!</span>", M, src), 1)
|
||||
|
||||
/obj/machinery/singularity/proc/emp_area()
|
||||
empulse(src, 8, 10)
|
||||
return
|
||||
if(current_size != 11)
|
||||
empulse(src, 8, 10)
|
||||
else
|
||||
empulse(src, 12, 16)
|
||||
|
||||
/obj/machinery/singularity/proc/smwave()
|
||||
for(var/mob/living/M in view(10, src.loc))
|
||||
if(prob(67))
|
||||
M.apply_effect(rand(energy), IRRADIATE)
|
||||
M << "<span class=\"warning\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>"
|
||||
M << "<span class=\"notice\">Miraculously, it fails to kill you.</span>"
|
||||
else
|
||||
M << "<span class=\"danger\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>"
|
||||
M << "<span class=\"danger\">You don't even have a moment to react as you are reduced to ashes by the intense radiation.</span>"
|
||||
M.dust()
|
||||
return
|
||||
|
||||
/obj/machinery/singularity/proc/pulse()
|
||||
|
||||
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
|
||||
if(get_dist(R, src) <= 15) // Better than using orange() every process
|
||||
if (get_dist(R, src) <= 15) //Better than using orange() every process.
|
||||
R.receive_pulse(energy)
|
||||
return
|
||||
|
||||
/obj/machinery/singularity/proc/on_capture()
|
||||
chained = 1
|
||||
overlays = 0
|
||||
move_self = 0
|
||||
switch (current_size)
|
||||
if(1)
|
||||
overlays += image('icons/obj/singularity.dmi',"chain_s1")
|
||||
if(3)
|
||||
overlays += image('icons/effects/96x96.dmi',"chain_s3")
|
||||
if(5)
|
||||
overlays += image('icons/effects/160x160.dmi',"chain_s5")
|
||||
if(7)
|
||||
overlays += image('icons/effects/224x224.dmi',"chain_s7")
|
||||
if(9)
|
||||
overlays += image('icons/effects/288x288.dmi',"chain_s9")
|
||||
|
||||
/obj/machinery/singularity/proc/on_release()
|
||||
chained = 0
|
||||
overlays = 0
|
||||
move_self = 1
|
||||
|
||||
/obj/machinery/singularity/singularity_act(S, size)
|
||||
if(current_size <= size)
|
||||
var/gain = (energy/2)
|
||||
var/dist = max((current_size - 2), 1)
|
||||
explosion(src.loc,(dist),(dist*2),(dist*4))
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return gain
|
||||
|
||||
@@ -156,6 +156,8 @@ datum
|
||||
else if(istype(self.data["donor"], /mob/living/carbon/alien))
|
||||
var/obj/effect/decal/cleanable/blood/B = blood_splatter(T,self,1)
|
||||
if(B) B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*"
|
||||
if(volume >= 5 && !istype(T.loc, /area/chapel)) //blood desanctifies non-chapel tiles
|
||||
T.holy = 0
|
||||
return
|
||||
|
||||
/* Must check the transfering of reagents and their data first. They all can point to one disease datum.
|
||||
@@ -289,6 +291,12 @@ datum
|
||||
holder.remove_reagent(src.id, 10 * REAGENTS_METABOLISM) //high metabolism to prevent extended uncult rolls.
|
||||
return
|
||||
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
src = null
|
||||
if(volume >= 5)
|
||||
T.holy = 1
|
||||
return
|
||||
|
||||
lube
|
||||
name = "Space Lube"
|
||||
id = "lube"
|
||||
|
||||
@@ -332,29 +332,7 @@
|
||||
defer_powernet_rebuild = 1
|
||||
// Let's just make this one loop.
|
||||
for(var/atom/X in orange(pull_radius,src))
|
||||
// Movable atoms only
|
||||
if(istype(X, /atom/movable))
|
||||
if(is_type_in_list(X, uneatable)) continue
|
||||
if(((X) && (!istype(X,/mob/living/carbon/human))))
|
||||
step_towards(X,src)
|
||||
if(istype(X, /obj)) //unanchored objects pulled twice as fast
|
||||
var/obj/O = X
|
||||
if(!O.anchored)
|
||||
step_towards(X,src)
|
||||
else
|
||||
step_towards(X,src)
|
||||
if(istype(X, /obj/structure/window)) //shatter windows
|
||||
var/obj/structure/window/W = X
|
||||
W.ex_act(2.0)
|
||||
else if(istype(X,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = X
|
||||
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
||||
if(M.magpulse)
|
||||
step_towards(H,src) //step just once with magboots
|
||||
continue
|
||||
step_towards(H,src) //step twice
|
||||
step_towards(H,src)
|
||||
X.singularity_pull(src, STAGE_FIVE)
|
||||
|
||||
if(defer_powernet_rebuild != 2)
|
||||
defer_powernet_rebuild = 0
|
||||
|
||||
Reference in New Issue
Block a user