mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Merge remote-tracking branch 'upstream/master' into revenants
This commit is contained in:
@@ -384,17 +384,26 @@ var/list/admin_verbs_mentor = list(
|
||||
if(null)
|
||||
return 0
|
||||
if("Small Bomb")
|
||||
explosion(epicenter, 1, 2, 3)
|
||||
explosion(epicenter, 1, 2, 3, 3)
|
||||
if("Medium Bomb")
|
||||
explosion(epicenter, 2, 3, 4)
|
||||
explosion(epicenter, 2, 3, 4, 4)
|
||||
if("Big Bomb")
|
||||
explosion(epicenter, 3, 5, 7)
|
||||
explosion(epicenter, 3, 5, 7, 5)
|
||||
if("Custom Bomb")
|
||||
var/devastation_range = input("Devastation range (in tiles):") as num
|
||||
var/heavy_impact_range = input("Heavy impact range (in tiles):") as num
|
||||
var/light_impact_range = input("Light impact range (in tiles):") as num
|
||||
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range)
|
||||
message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].")
|
||||
var/devastation_range = input("Devastation range (in tiles):") as null|num
|
||||
if(devastation_range == null)
|
||||
return
|
||||
var/heavy_impact_range = input("Heavy impact range (in tiles):") as null|num
|
||||
if(heavy_impact_range == null)
|
||||
return
|
||||
var/light_impact_range = input("Light impact range (in tiles):") as null|num
|
||||
if(light_impact_range == null)
|
||||
return
|
||||
var/flash_range = input("Flash range (in tiles):") as null|num
|
||||
if(flash_range == null)
|
||||
return
|
||||
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, 1, 1)
|
||||
message_admins("<span class='adminnotice'>[ckey] creating an admin explosion at [epicenter.loc].</span>")
|
||||
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
|
||||
|
||||
+16
-12
@@ -2332,18 +2332,22 @@
|
||||
if("togglebombcap")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BC")
|
||||
switch(MAX_EXPLOSION_RANGE)
|
||||
if(14) MAX_EXPLOSION_RANGE = 16
|
||||
if(16) MAX_EXPLOSION_RANGE = 20
|
||||
if(20) MAX_EXPLOSION_RANGE = 28
|
||||
if(28) MAX_EXPLOSION_RANGE = 56
|
||||
if(56) MAX_EXPLOSION_RANGE = 128
|
||||
else MAX_EXPLOSION_RANGE = 14
|
||||
var/range_dev = MAX_EXPLOSION_RANGE *0.25
|
||||
var/range_high = MAX_EXPLOSION_RANGE *0.5
|
||||
var/range_low = MAX_EXPLOSION_RANGE
|
||||
message_admins("\red <b> [key_name_admin(usr)] changed the bomb cap to [range_dev], [range_high], [range_low]</b>", 1)
|
||||
log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EXPLOSION_RANGE]")
|
||||
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", MAX_EX_LIGHT_RANGE) as num|null
|
||||
if (newBombCap < 4)
|
||||
return
|
||||
if (newBombCap > 128)
|
||||
newBombCap = 128
|
||||
|
||||
MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
|
||||
MAX_EX_HEAVY_RANGE = round(newBombCap/2)
|
||||
MAX_EX_LIGHT_RANGE = newBombCap
|
||||
//I don't know why these are their own variables, but fuck it, they are.
|
||||
MAX_EX_FLASH_RANGE = newBombCap
|
||||
MAX_EX_FLAME_RANGE = newBombCap
|
||||
|
||||
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]</span>")
|
||||
log_admin("[key_name(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
|
||||
|
||||
if("flicklights")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
|
||||
@@ -150,7 +150,7 @@ client/proc/one_click_antag()
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(G.client.prefs.be_special & BE_WIZARD)
|
||||
if(istype(G) && G.client && G.client.prefs.be_special & BE_WIZARD)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,BE_WIZARD))
|
||||
spawn(0)
|
||||
@@ -168,7 +168,7 @@ client/proc/one_click_antag()
|
||||
|
||||
if(candidates.len)
|
||||
candidates = shuffle(candidates)
|
||||
for(var/mob/i in candidates)
|
||||
for(var/mob/dead/observer/i in candidates)
|
||||
if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
|
||||
|
||||
theghost = i
|
||||
@@ -224,7 +224,7 @@ client/proc/one_click_antag()
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(G.client.prefs.be_special & BE_OPERATIVE)
|
||||
if(istype(G) && G.client && G.client.prefs.be_special & BE_OPERATIVE)
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,BE_OPERATIVE))
|
||||
spawn(0)
|
||||
@@ -451,7 +451,7 @@ client/proc/one_click_antag()
|
||||
|
||||
//Generates a list of candidates from active ghosts.
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(G.client.prefs.be_special & BE_RAIDER)
|
||||
if(istype(G) && G.client && G.client.prefs.be_special & BE_RAIDER)
|
||||
if(player_old_enough_antag(G.client,BE_RAIDER))
|
||||
if(!jobban_isbanned(G, "raider") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
|
||||
@@ -698,15 +698,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(light == null) return
|
||||
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
||||
if(flash == null) return
|
||||
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
||||
if(flames == null) return
|
||||
|
||||
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
|
||||
if ((devastation > 20) || (heavy > 20) || (light > 20))
|
||||
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
|
||||
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
|
||||
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
|
||||
return
|
||||
|
||||
explosion(O, devastation, heavy, light, flash)
|
||||
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])")
|
||||
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])", 1)
|
||||
explosion(O, devastation, heavy, light, flash, null, null,flames)
|
||||
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
||||
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
||||
feedback_add_details("admin_verb","EXPL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
else
|
||||
|
||||
@@ -192,15 +192,15 @@
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -216,4 +216,4 @@
|
||||
if(previous)
|
||||
previous.next = null
|
||||
master.last = previous
|
||||
..()
|
||||
return ..()
|
||||
@@ -12,8 +12,7 @@
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
del(part1)
|
||||
del(part2)
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !status)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/item/clothing/mask/horsehead/Destroy()
|
||||
if(flags & NODROP)
|
||||
goodbye_horses(loc)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/mask/horsehead/proc/goodbye_horses(mob/user) //I'm flying over you
|
||||
if(!ismob(user))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/obj/item/clothing/head/helmet/space/chronos/Destroy()
|
||||
dropped()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/chronos
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/Destroy()
|
||||
dropped()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/emp_act(severity)
|
||||
var/mob/living/carbon/human/user = src.loc
|
||||
@@ -209,4 +209,4 @@
|
||||
holder.remote_control = null
|
||||
if(holder.client && (holder.client.eye == src))
|
||||
holder.client.eye = holder
|
||||
..()
|
||||
return ..()
|
||||
@@ -214,82 +214,54 @@
|
||||
|
||||
if(!istype(user,/mob/living)) return
|
||||
|
||||
if(user.a_intent == "help")
|
||||
|
||||
if(istype(src.loc,/mob/living))
|
||||
user << "How do you propose to modify a hardsuit while it is being worn?"
|
||||
if(istype(src.loc,/mob/living))
|
||||
user << "How do you propose to modify a hardsuit while it is being worn?"
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(!helmet)
|
||||
user << "\The [src] does not have a helmet installed."
|
||||
else
|
||||
user << "You detach \the [helmet] from \the [src]'s helmet mount."
|
||||
helmet.loc = get_turf(src)
|
||||
src.helmet = null
|
||||
return
|
||||
if(!boots)
|
||||
user << "\The [src] does not have any boots installed."
|
||||
else
|
||||
user << "You detatch \the [boots] from \the [src]'s boot mounts."
|
||||
boots.loc = get_turf(src)
|
||||
boots = null
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/clothing/head/helmet/space))
|
||||
if(!attached_helmet)
|
||||
user << "\The [src] does not have a helmet mount."
|
||||
return
|
||||
if(helmet)
|
||||
user << "\The [src] already has a helmet installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s helmet mount."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.helmet = W
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/clothing/shoes/magboots))
|
||||
if(!attached_boots)
|
||||
user << "\The [src] does not have boot mounts."
|
||||
return
|
||||
|
||||
var/target_zone = user.zone_sel.selecting
|
||||
|
||||
if(target_zone == "head")
|
||||
|
||||
//Installing a component into or modifying the contents of the helmet.
|
||||
if(!attached_helmet)
|
||||
user << "\The [src] does not have a helmet mount."
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(!helmet)
|
||||
user << "\The [src] does not have a helmet installed."
|
||||
else
|
||||
user << "You detach \the [helmet] from \the [src]'s helmet mount."
|
||||
helmet.loc = get_turf(src)
|
||||
src.helmet = null
|
||||
return
|
||||
else if(istype(W,/obj/item/clothing/head/helmet/space))
|
||||
if(helmet)
|
||||
user << "\The [src] already has a helmet installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s helmet mount."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.helmet = W
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
else if(target_zone == "l_leg" || target_zone == "r_leg" || target_zone == "l_foot" || target_zone == "r_foot")
|
||||
|
||||
//Installing a component into or modifying the contents of the feet.
|
||||
if(!attached_boots)
|
||||
user << "\The [src] does not have boot mounts."
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(!boots)
|
||||
user << "\The [src] does not have any boots installed."
|
||||
else
|
||||
user << "You detatch \the [boots] from \the [src]'s boot mounts."
|
||||
boots.loc = get_turf(src)
|
||||
boots = null
|
||||
return
|
||||
else if(istype(W,/obj/item/clothing/shoes/magboots))
|
||||
if(boots)
|
||||
user << "\The [src] already has magboots installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s boot mounts."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
boots = W
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*
|
||||
else if(target_zone == "l_arm" || target_zone == "r_arm" || target_zone == "l_hand" || target_zone == "r_hand")
|
||||
|
||||
//Installing a component into or modifying the contents of the hands.
|
||||
|
||||
else if(target_zone == "torso" || target_zone == "groin")
|
||||
|
||||
//Modifying the cell or mounted devices
|
||||
|
||||
if(!mounted_devices)
|
||||
return
|
||||
*/
|
||||
|
||||
else //wat
|
||||
return ..()
|
||||
if(boots)
|
||||
user << "\The [src] already has magboots installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s boot mounts."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
boots = W
|
||||
else
|
||||
return ..()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -161,6 +161,20 @@
|
||||
desc = "A blue forensics technician jacket."
|
||||
icon_state = "forensics_blue"
|
||||
|
||||
//Blueshield
|
||||
/obj/item/clothing/suit/storage/blueshield
|
||||
name = "blueshield coat"
|
||||
desc = "NT deluxe ripoff. You finally have your own coat."
|
||||
icon_state = "blueshieldcoat"
|
||||
item_state = "det_suit"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic)
|
||||
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags = ONESIZEFITSALL
|
||||
|
||||
//Engineering
|
||||
/obj/item/clothing/suit/storage/hazardvest
|
||||
name = "hazard vest"
|
||||
|
||||
@@ -372,6 +372,7 @@
|
||||
item_state = "xenos_helm"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
flags = ONESIZEFITSALL
|
||||
siemens_coefficient = 2.0
|
||||
//swimsuit
|
||||
/obj/item/clothing/under/swimsuit/
|
||||
|
||||
@@ -142,4 +142,16 @@
|
||||
desc = "A security suit decorated for those few with the dedication to achieve the position of Head of Security."
|
||||
icon_state = "hos_formal"
|
||||
item_state = "gy_suit"
|
||||
_color = "hos_formal"
|
||||
_color = "hos_formal"
|
||||
|
||||
|
||||
//Brig Physician
|
||||
/obj/item/clothing/under/rank/security/brigphys
|
||||
desc = "Jumpsuit for Brig Physician it has both medical and security protection."
|
||||
name = "brig physician's jumpsuit"
|
||||
icon_state = "brig_phys"
|
||||
item_state = "brig_phys"
|
||||
_color = "brig_phys"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
flags = ONESIZEFITSALL
|
||||
@@ -109,6 +109,14 @@
|
||||
displays_id = 0
|
||||
flags = ONESIZEFITSALL
|
||||
|
||||
/obj/item/clothing/under/rank/centcom/diplomatic
|
||||
desc = "A very gaudy and official looking uniform of the Nanotrasen Diplomatic Corps."
|
||||
name = "\improper Nanotrasen Diplomatic Uniform"
|
||||
icon_state = "presidente"
|
||||
item_state = "g_suit"
|
||||
_color = "presidente"
|
||||
displays_id = 0
|
||||
|
||||
/obj/item/clothing/under/rank/blueshield
|
||||
name = "blueshield uniform"
|
||||
desc = "A short-sleeved black uniform, paired with grey digital-camo cargo pants. Standard issue to Blueshield officers."
|
||||
|
||||
@@ -201,14 +201,6 @@
|
||||
|
||||
// todo does this do enough
|
||||
|
||||
|
||||
meteorhit(var/obj/O as obj)
|
||||
for(var/x in verbs)
|
||||
verbs -= x
|
||||
set_broken()
|
||||
return
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
if(prob(20/severity)) set_broken()
|
||||
..()
|
||||
@@ -217,11 +209,11 @@
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(25))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if (prob(50))
|
||||
for(var/x in verbs)
|
||||
|
||||
@@ -145,7 +145,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Vines", /datum/event/spacevine, 250, list(ASSIGNMENT_ENGINEER = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 30)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
|
||||
|
||||
@@ -87,7 +87,6 @@ var/global/list/possibleEvents = list()
|
||||
possibleEvents[/datum/event/anomaly/anomaly_flux] = 50 + 50 * active_with_role["Engineer"]
|
||||
|
||||
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/meteor_shower] = 20 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/blob] = 10 * active_with_role["Engineer"]
|
||||
|
||||
if(active_with_role["Medical"] > 0)
|
||||
|
||||
@@ -1,46 +1,39 @@
|
||||
//cael - two events here
|
||||
|
||||
//meteor storms are much heavier
|
||||
/datum/event/meteor_wave
|
||||
startWhen = 6
|
||||
endWhen = 33
|
||||
|
||||
/datum/event/meteor_wave/setup()
|
||||
endWhen = rand(10,25) * 3
|
||||
|
||||
/datum/event/meteor_wave/announce()
|
||||
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
|
||||
/datum/event/meteor_wave/tick()
|
||||
if(IsMultiple(activeFor, 3))
|
||||
spawn_meteors(rand(2,5))
|
||||
|
||||
/datum/event/meteor_wave/end()
|
||||
command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
|
||||
|
||||
//
|
||||
/datum/event/meteor_shower
|
||||
startWhen = 5
|
||||
endWhen = 7
|
||||
var/next_meteor = 6
|
||||
var/waves = 1
|
||||
|
||||
/datum/event/meteor_shower/setup()
|
||||
waves = rand(1,4)
|
||||
/datum/event/meteor_wave/setup()
|
||||
waves = severity * rand(1,3)
|
||||
|
||||
/datum/event/meteor_shower/announce()
|
||||
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
|
||||
/datum/event/meteor_wave/announce()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
else
|
||||
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
|
||||
|
||||
//meteor showers are lighter and more common,
|
||||
/datum/event/meteor_shower/tick()
|
||||
if(activeFor >= next_meteor)
|
||||
spawn_meteors(rand(1,4))
|
||||
next_meteor += rand(20,100)
|
||||
/datum/event/meteor_wave/tick()
|
||||
if(waves && activeFor >= next_meteor)
|
||||
spawn() spawn_meteors(severity * rand(1,2), get_meteors())
|
||||
next_meteor += rand(15, 30) / severity
|
||||
waves--
|
||||
if(waves <= 0)
|
||||
endWhen = activeFor + 1
|
||||
else
|
||||
endWhen = next_meteor + 1
|
||||
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
|
||||
|
||||
/datum/event/meteor_shower/end()
|
||||
command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
|
||||
/datum/event/meteor_wave/end()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
|
||||
else
|
||||
command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
|
||||
|
||||
/datum/event/meteor_wave/proc/get_meteors()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
return meteors_catastrophic
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
return meteors_threatening
|
||||
else
|
||||
return meteors_normal
|
||||
@@ -32,7 +32,7 @@
|
||||
invisibility = 101
|
||||
new /obj/effect/decal/cleanable/blood(get_turf(A))
|
||||
if(ismob(A))
|
||||
A.meteorhit(src)
|
||||
A.ex_act(strength)
|
||||
else
|
||||
spawn(0)
|
||||
if(A)
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
newAnomaly = new /obj/effect/anomaly/flux(T.loc)
|
||||
|
||||
/datum/event/anomaly/anomaly_flux/end()
|
||||
if(newAnomaly)//If it hasn't been neutralized, it's time to blow up.
|
||||
explosion(newAnomaly.loc, 0, 4, 6, 5)
|
||||
if(newAnomaly.loc)//If it hasn't been neutralized, it's time to blow up.
|
||||
explosion(newAnomaly, -1, 3, 5, 5)
|
||||
qdel(newAnomaly)
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/datum/event/anomaly/anomaly_pyro/end()
|
||||
if(newAnomaly.loc)
|
||||
explosion(get_turf(newAnomaly), -1,0,3)
|
||||
explosion(get_turf(newAnomaly), -1,0,3, flame_range = 4)
|
||||
|
||||
var/mob/living/carbon/slime/S = new/mob/living/carbon/slime(get_turf(newAnomaly))
|
||||
S.colour = pick("red", "orange")
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
M.speak = rampant_speeches.Copy()
|
||||
M.speak_chance = 15
|
||||
else
|
||||
explosion(upriser.loc, -1, 1, 2)
|
||||
explosion(upriser.loc, -1, 1, 2, 4, 0)
|
||||
qdel(upriser)
|
||||
|
||||
kill()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
|
||||
if(ismob(A))
|
||||
A.meteorhit(src)//This should work for now I guess
|
||||
A.ex_act(strength)//This should work for now I guess
|
||||
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
|
||||
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
|
||||
|
||||
@@ -99,5 +99,5 @@
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -85,7 +85,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
|
||||
else if (istype(clong, /mob))
|
||||
if(clong.density || prob(10))
|
||||
clong.meteorhit(src)
|
||||
clong.ex_act(2)
|
||||
else
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
if(user == M)
|
||||
return ..()
|
||||
|
||||
if(user.a_intent == "hurt")
|
||||
if(user.a_intent == "harm")
|
||||
|
||||
// This is being copypasted here because reagent_containers (WHY DOES FOOD DESCEND FROM THAT) overrides it completely.
|
||||
// TODO: refactor all food paths to be less horrible and difficult to work with in this respect. ~Z
|
||||
@@ -349,7 +349,7 @@
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
|
||||
if(user.a_intent == "hurt")
|
||||
if(user.a_intent == "harm")
|
||||
user.visible_message("<span class='danger'>\The [user] squashes \the [src]!</span>")
|
||||
seed.thrown_at(src,user)
|
||||
sleep(-1)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
/obj/effect/landmark/animal_spawner/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/animal_spawner/panther
|
||||
name = "panther spawner"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
/obj/effect/jungle_tribe_spawn/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/jungle_tribe_spawn/process()
|
||||
set background = 1
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process
|
||||
|
||||
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
|
||||
#define LIGHTING_LAMBERTIAN 1 // use lambertian shading for light sources
|
||||
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
||||
#define LIGHTING_TRANSITIONS 1 // smooth, animated transitions, similar to /tg/station
|
||||
|
||||
#define LIGHTING_RESOLUTION 1 // resolution of the lighting overlays, powers of 2 only, max of 32
|
||||
#define LIGHTING_LAYER 10 // drawing layer for lighting overlays
|
||||
#define LIGHTING_ICON 'icons/effects/lighting_overlay.dmi' // icon used for lighting shading effects
|
||||
@@ -60,13 +60,16 @@
|
||||
if(top_atom != source_atom)
|
||||
if(!top_atom.light_sources) top_atom.light_sources = list()
|
||||
top_atom.light_sources += src
|
||||
lighting_update_lights += src
|
||||
needs_update = 1
|
||||
|
||||
if(!needs_update) //Incase we're already updating either way.
|
||||
lighting_update_lights += src
|
||||
needs_update = 1
|
||||
|
||||
/datum/light_source/proc/force_update()
|
||||
needs_update = 1
|
||||
force_update = 1
|
||||
lighting_update_lights += src
|
||||
if(!needs_update) //Incase we're already updating either way.
|
||||
needs_update = 1
|
||||
lighting_update_lights += src
|
||||
|
||||
/datum/light_source/proc/check()
|
||||
if(!source_atom || !light_range || !light_power)
|
||||
@@ -142,28 +145,67 @@
|
||||
/datum/light_source/proc/apply_lum()
|
||||
applied = 1
|
||||
if(istype(source_turf))
|
||||
for(var/atom/movable/lighting_overlay/O in view(light_range, source_turf))
|
||||
var/strength = light_power * falloff(O)
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
for(var/turf/T in dview(light_range, source_turf, INVISIBILITY_LIGHTING))
|
||||
if(T.lighting_overlay)
|
||||
var/strength = light_power * falloff(T.lighting_overlay)
|
||||
if(!strength) //Don't add turfs that aren't affected to the affected turfs.
|
||||
continue
|
||||
|
||||
effect_r[O] = lum_r * strength
|
||||
effect_g[O] = lum_g * strength
|
||||
effect_b[O] = lum_b * strength
|
||||
effect_r[T.lighting_overlay] = round(lum_r * strength, LIGHTING_ROUND_VALUE)
|
||||
effect_g[T.lighting_overlay] = round(lum_g * strength, LIGHTING_ROUND_VALUE)
|
||||
effect_b[T.lighting_overlay] = round(lum_b * strength, LIGHTING_ROUND_VALUE)
|
||||
|
||||
T.lighting_overlay.update_lumcount(
|
||||
round(lum_r * strength, LIGHTING_ROUND_VALUE),
|
||||
round(lum_g * strength, LIGHTING_ROUND_VALUE),
|
||||
round(lum_b * strength, LIGHTING_ROUND_VALUE)
|
||||
)
|
||||
|
||||
if(!T.affecting_lights)
|
||||
T.affecting_lights = list()
|
||||
|
||||
O.update_lumcount(lum_r * strength, lum_g * strength, lum_b * strength)
|
||||
for(var/turf/T in view(light_range, source_turf))
|
||||
if(!T.affecting_lights) T.affecting_lights = list()
|
||||
T.affecting_lights += src
|
||||
effect_turf += T
|
||||
|
||||
#else
|
||||
for(var/turf/T in dview(light_range, source_turf, INVISIBILITY_LIGHTING))
|
||||
for(var/atom/movable/lighting_overlay/L in T.lighting_overlays)
|
||||
var/strength = light_power * falloff(L)
|
||||
|
||||
effect_r[L] = round(lum_r * strength, LIGHTING_ROUND_VALUE)
|
||||
effect_g[L] = round(lum_g * strength, LIGHTING_ROUND_VALUE)
|
||||
effect_b[L] = round(lum_b * strength, LIGHTING_ROUND_VALUE)
|
||||
|
||||
L.update_lumcount(
|
||||
round(lum_r * strength, LIGHTING_ROUND_VALUE),
|
||||
round(lum_g * strength, LIGHTING_ROUND_VALUE),
|
||||
round(lum_b * strength, LIGHTING_ROUND_VALUE)
|
||||
)
|
||||
|
||||
if(!T.affecting_lights)
|
||||
T.affecting_lights = list()
|
||||
|
||||
T.affecting_lights += src
|
||||
effect_turf += T
|
||||
#endif
|
||||
|
||||
/datum/light_source/proc/remove_lum()
|
||||
applied = 0
|
||||
for(var/atom/movable/lighting_overlay/O in effect_r)
|
||||
O.update_lumcount(-effect_r[O], -effect_g[O], -effect_b[O])
|
||||
|
||||
for(var/turf/T in effect_turf)
|
||||
if(T.affecting_lights) T.affecting_lights -= src
|
||||
if(T.affecting_lights)
|
||||
T.affecting_lights -= src
|
||||
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
if(T.lighting_overlay)
|
||||
T.lighting_overlay.update_lumcount(-effect_r[T.lighting_overlay], -effect_g[T.lighting_overlay], -effect_b[T.lighting_overlay])
|
||||
#else
|
||||
for(var/atom/movable/lighting_overlay/L in T.lighting_overlays)
|
||||
L.lighting_overlay.update_lumcount(-effect_r[L], -effect_g[L], -effect_b[L])
|
||||
#endif
|
||||
|
||||
|
||||
effect_r.Cut()
|
||||
effect_g.Cut()
|
||||
effect_b.Cut()
|
||||
effect_turf.Cut()
|
||||
effect_turf.Cut()
|
||||
|
||||
@@ -35,12 +35,32 @@
|
||||
return (lum - minlum) / (maxlum - minlum)
|
||||
|
||||
/atom/movable/lighting_overlay/proc/update_lumcount(delta_r, delta_g, delta_b)
|
||||
if(!delta_r && !delta_g && !delta_b) //Nothing is being changed all together.
|
||||
return
|
||||
|
||||
var/should_update = 0
|
||||
|
||||
if(!needs_update) //If this isn't true, we're already updating anyways.
|
||||
if(max(lum_r, lum_g, lum_b) < 1) //Any change that could happen WILL change appearance.
|
||||
should_update = 1
|
||||
|
||||
else if(max(lum_r + delta_r, lum_g + delta_g, lum_b + delta_b) < 1) //The change would bring us under 1 max lum, again, guaranteed to change appearance.
|
||||
should_update = 1
|
||||
|
||||
else //We need to make sure that the colour ratios won't change in this code block.
|
||||
var/mx1 = max(lum_r, lum_g, lum_b)
|
||||
var/mx2 = max(lum_r + delta_r, lum_g + delta_g, lum_b + delta_b)
|
||||
|
||||
if(lum_r / mx1 != (lum_r + delta_r) / mx2 || lum_g / mx1 != (lum_g + delta_g) / mx2 || lum_b / mx1 != (lum_b + delta_b) / mx2) //Stuff would change.
|
||||
should_update = 1
|
||||
|
||||
lum_r += delta_r
|
||||
lum_g += delta_g
|
||||
lum_b += delta_b
|
||||
|
||||
needs_update = 1
|
||||
lighting_update_overlays += src
|
||||
if(!needs_update && should_update)
|
||||
needs_update = 1
|
||||
lighting_update_overlays += src
|
||||
|
||||
/atom/movable/lighting_overlay/proc/update_overlay()
|
||||
var/mx = max(lum_r, lum_g, lum_b)
|
||||
@@ -50,14 +70,48 @@
|
||||
#if LIGHTING_TRANSITIONS == 1
|
||||
animate(src,
|
||||
color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .),
|
||||
LIGHTING_INTERVAL - 1
|
||||
LIGHTING_TRANSITION_SPEED
|
||||
)
|
||||
#else
|
||||
color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .)
|
||||
#endif
|
||||
|
||||
var/turf/T = loc
|
||||
|
||||
if(istype(T)) //Incase we're not on a turf, pool ourselves, something happened.
|
||||
if(color != "#000000")
|
||||
T.luminosity = 1
|
||||
else //No light, set the turf's luminosity to 0 to remove it from view()
|
||||
#if LIGHTING_TRANSITIONS == 1
|
||||
spawn(LIGHTING_TRANSITION_SPEED)
|
||||
T.luminosity = 0
|
||||
#else
|
||||
T.luminosity = 0
|
||||
#endif
|
||||
|
||||
else
|
||||
warning("A lighting overlay realised it's loc was NOT a turf (actual loc: [loc], [loc.type]) in update_overlay() and got qdel'd!")
|
||||
qdel(src)
|
||||
|
||||
/atom/movable/lighting_overlay/singularity_act()
|
||||
return
|
||||
|
||||
/atom/movable/lighting_overlay/singularity_pull()
|
||||
return
|
||||
return
|
||||
|
||||
/atom/movable/lighting_overlay/Destroy()
|
||||
lighting_update_overlays -= src
|
||||
|
||||
var/turf/T = loc
|
||||
if(istype(T))
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
T.lighting_overlay = null
|
||||
#else
|
||||
T.lighting_overlays -= src
|
||||
#endif
|
||||
for(var/datum/light_source/D in T.affecting_lights) //Remove references to us on the light sources affecting us.
|
||||
D.effect_r -= src
|
||||
D.effect_g -= src
|
||||
D.effect_b -= src
|
||||
|
||||
return ..()
|
||||
@@ -15,6 +15,7 @@
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/O = new(T)
|
||||
O.icon_state = state
|
||||
T.lighting_overlay = O
|
||||
#else
|
||||
for(var/i = 0; i < LIGHTING_RESOLUTION; i++)
|
||||
for(var/j = 0; j < LIGHTING_RESOLUTION; j++)
|
||||
@@ -24,6 +25,7 @@
|
||||
O.xoffset = (((2*i + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.yoffset = (((2*j + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.icon_state = state
|
||||
T.lighting_overlays += O
|
||||
#endif
|
||||
else
|
||||
for(var/x = 1; x <= world.maxx; x++)
|
||||
@@ -35,6 +37,7 @@
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/O = new(T)
|
||||
O.icon_state = state
|
||||
T.lighting_overlay = O
|
||||
#else
|
||||
for(var/i = 0; i < LIGHTING_RESOLUTION; i++)
|
||||
for(var/j = 0; j < LIGHTING_RESOLUTION; j++)
|
||||
@@ -44,4 +47,5 @@
|
||||
O.xoffset = (((2*i + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.yoffset = (((2*j + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.icon_state = state
|
||||
T.lighting_overlays += O
|
||||
#endif
|
||||
@@ -1,29 +1,47 @@
|
||||
/turf
|
||||
var/list/affecting_lights
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/lighting_overlay
|
||||
#else
|
||||
var/list/lighting_overlays[0]
|
||||
#endif
|
||||
|
||||
/turf/proc/reconsider_lights()
|
||||
for(var/datum/light_source/L in affecting_lights)
|
||||
L.force_update()
|
||||
|
||||
/turf/proc/lighting_clear_overlays()
|
||||
for(var/atom/movable/lighting_overlay/L in src)
|
||||
L.loc = null
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
if(lighting_overlay)
|
||||
qdel(lighting_overlay)
|
||||
#else
|
||||
for(var/atom/movable/lighting_overlay/L in lighting_overlays)
|
||||
qdel(L)
|
||||
#endif
|
||||
|
||||
/turf/proc/lighting_build_overlays()
|
||||
if(!locate(/atom/movable/lighting_overlay) in src)
|
||||
var/state = "light[LIGHTING_RESOLUTION]"
|
||||
var/area/A = loc
|
||||
if(A.lighting_use_dynamic)
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/O = new(src)
|
||||
O.icon_state = state
|
||||
#else
|
||||
for(var/i = 0; i < LIGHTING_RESOLUTION; i++)
|
||||
for(var/j = 0; j < LIGHTING_RESOLUTION; j++)
|
||||
var/atom/movable/lighting_overlay/O = new(src)
|
||||
O.pixel_x = i * (32 / LIGHTING_RESOLUTION)
|
||||
O.pixel_y = j * (32 / LIGHTING_RESOLUTION)
|
||||
O.xoffset = (((2*i + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.yoffset = (((2*j + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.icon_state = state
|
||||
#endif
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
if(lighting_overlay)
|
||||
#else
|
||||
if(lighting_overlays.len)
|
||||
#endif
|
||||
return
|
||||
|
||||
var/state = "light[LIGHTING_RESOLUTION]"
|
||||
var/area/A = loc
|
||||
if(A.lighting_use_dynamic)
|
||||
#if LIGHTING_RESOLUTION == 1
|
||||
var/atom/movable/lighting_overlay/O = new(src)
|
||||
O.icon_state = state
|
||||
lighting_overlay = O
|
||||
#else
|
||||
for(var/i = 0; i < LIGHTING_RESOLUTION; i++)
|
||||
for(var/j = 0; j < LIGHTING_RESOLUTION; j++)
|
||||
var/atom/movable/lighting_overlay/O = new(src)
|
||||
O.pixel_x = i * (32 / LIGHTING_RESOLUTION)
|
||||
O.pixel_y = j * (32 / LIGHTING_RESOLUTION)
|
||||
O.xoffset = (((2*i + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.yoffset = (((2*j + 1) / (LIGHTING_RESOLUTION * 2)) - 0.5)
|
||||
O.icon_state = state
|
||||
lighting_overlays += O
|
||||
#endif
|
||||
@@ -133,7 +133,7 @@ obj/effect/liquid/Move()
|
||||
|
||||
obj/effect/liquid/Destroy()
|
||||
src.controller.liquid_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
obj/effect/liquid/proc/update_icon2()
|
||||
//icon_state = num2text( max(1,min(7,(floor(volume),10)/10)) )
|
||||
|
||||
@@ -101,4 +101,4 @@
|
||||
|
||||
/obj/machinery/media/Destroy()
|
||||
disconnect_media_source()
|
||||
..()
|
||||
return ..()
|
||||
@@ -82,8 +82,8 @@
|
||||
if (attempts == 0)
|
||||
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
|
||||
var/turf/T = get_turf(src.loc)
|
||||
explosion(T, 0, 0, 0, 1)
|
||||
del(src)
|
||||
explosion(T, -1, -1, 1, 1)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out.</span>"
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(prob(50 / severity) && severity < 3)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/**********************Mining Equipment Locker Items**************************/
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0) del(src)
|
||||
if(1.0) qdel(src)
|
||||
if(2.0)
|
||||
if (prob(60)) stat |= BROKEN
|
||||
if(3.0)
|
||||
@@ -54,10 +54,6 @@
|
||||
if (prob(25)) del src
|
||||
return
|
||||
|
||||
meteorhit()
|
||||
if (prob(50)) del src
|
||||
return
|
||||
|
||||
power_change()
|
||||
if(stat & BROKEN) icon_state = "fab-broken"
|
||||
else
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
/area/mine
|
||||
icon_state = "mining"
|
||||
music = 'sound/ambience/song_game.ogg'
|
||||
|
||||
/area/mine/explored
|
||||
name = "Mine"
|
||||
|
||||
@@ -343,12 +343,12 @@
|
||||
if(5)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
|
||||
if(6)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
getFromPool(/obj/item/weapon/shard/plasma, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard/plasma, loc)
|
||||
|
||||
if(7)
|
||||
var/obj/item/stack/sheet/mineral/uranium/R = new(src)
|
||||
|
||||
@@ -92,7 +92,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
|
||||
del(ghostimage)
|
||||
ghostimage = null
|
||||
updateallghostimages()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
|
||||
@@ -125,18 +125,6 @@
|
||||
adjustFireLoss(damage)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
adjustFireLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||
adjustFireLoss(30)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
|
||||
@@ -129,17 +129,6 @@
|
||||
/mob/living/carbon/alien/larva/attack_ui(slot_id)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/meteorhit(O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||
adjustFireLoss(30)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
|
||||
@@ -25,7 +25,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/alien_embryo/process()
|
||||
if(!affected_mob) return
|
||||
|
||||
@@ -382,22 +382,6 @@
|
||||
apply_damage(rand(20,30), BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/meteorhit(O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] has been hit by [O]", 1)
|
||||
if (health > 0)
|
||||
var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
|
||||
if(!affecting) return
|
||||
if (istype(O, /obj/effect/immovablerod))
|
||||
if(affecting.take_damage(101, 0))
|
||||
UpdateDamageIcon()
|
||||
else
|
||||
if(affecting.take_damage((istype(O, /obj/effect/meteor/small) ? 10 : 25), 30))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
|
||||
@@ -1151,6 +1151,8 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(85 to INFINITY)
|
||||
damageoverlay.overlays += brutefireloss_overlays["6"]//image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay6")
|
||||
//damageoverlay.overlays += I
|
||||
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
if( stat == DEAD )
|
||||
sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_in_dark = 8
|
||||
@@ -1186,36 +1188,40 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
see_in_dark = (G.darkness_view ? see_in_dark + G.darkness_view : species.darksight) // Otherwise we keep our darkness view with togglable nightvision.
|
||||
if(G.vision_flags) // MESONS
|
||||
sight |= G.vision_flags
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(!G.see_darkness)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
/* HUD shit goes here, as long as it doesn't modify sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
|
||||
switch(G.HUDType)
|
||||
if(SECHUD)
|
||||
process_sec_hud(src,1)
|
||||
if(MEDHUD)
|
||||
process_med_hud(src,1)
|
||||
if(ANTAGHUD)
|
||||
process_antag_hud(src)
|
||||
switch(G.HUDType)
|
||||
if(SECHUD)
|
||||
process_sec_hud(src,1)
|
||||
if(MEDHUD)
|
||||
process_med_hud(src,1)
|
||||
if(ANTAGHUD)
|
||||
process_antag_hud(src)
|
||||
|
||||
if(head)
|
||||
var/obj/item/clothing/head/H = head
|
||||
if(istype(H))
|
||||
if(H.vision_flags) // MESONS
|
||||
sight |= H.vision_flags
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(!H.see_darkness)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
/* HUD shit goes here, as long as it doesn't modify sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
|
||||
switch(H.HUDType)
|
||||
if(SECHUD)
|
||||
process_sec_hud(src,1)
|
||||
if(MEDHUD)
|
||||
process_med_hud(src,1)
|
||||
if(ANTAGHUD)
|
||||
process_antag_hud(src)
|
||||
switch(H.HUDType)
|
||||
if(SECHUD)
|
||||
process_sec_hud(src,1)
|
||||
if(MEDHUD)
|
||||
process_med_hud(src,1)
|
||||
if(ANTAGHUD)
|
||||
process_antag_hud(src)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -239,17 +239,6 @@
|
||||
/mob/living/carbon/slime/attack_ui(slot)
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/meteorhit(O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||
adjustFireLoss(30)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
if(!src || !target || target.weedlevel == 0) return //Sanity check.
|
||||
|
||||
src.reagents.add_reagent("nutriment", target.weedlevel)
|
||||
src.nutrition += target.weedlevel * 15
|
||||
target.weedlevel = 0
|
||||
src.visible_message("\red [src] begins rooting through [target], ripping out weeds and eating them noisily.","\red You begin rooting through [target], ripping out weeds and eating them noisily.")
|
||||
|
||||
|
||||
@@ -830,6 +830,8 @@
|
||||
float(!has_gravity)
|
||||
|
||||
/mob/living/proc/float(on)
|
||||
if(throwing)
|
||||
return
|
||||
if(on && !floating)
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
floating = 1
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
return
|
||||
|
||||
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
|
||||
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = -20, max = 20)
|
||||
fire_stacks = Clamp(fire_stacks + add_fire_stacks, -20, 20)
|
||||
|
||||
/mob/living/proc/handle_fire()
|
||||
if(fire_stacks < 0)
|
||||
|
||||
@@ -225,7 +225,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
ai_list -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
@@ -591,17 +591,6 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/meteorhit(obj/O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
//Foreach goto(19)
|
||||
if (health > 0)
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
adjustFireLoss(40)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/bullet_act(var/obj/item/projectile/Proj)
|
||||
..(Proj)
|
||||
updatehealth()
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
del(ghostimage)
|
||||
ghostimage = null;
|
||||
updateallghostimages()
|
||||
return ..()
|
||||
|
||||
// Movement code. Returns 0 to stop air movement from moving it.
|
||||
/mob/aiEye/Move()
|
||||
|
||||
@@ -203,16 +203,6 @@
|
||||
|
||||
// See software.dm for Topic()
|
||||
|
||||
/mob/living/silicon/pai/meteorhit(obj/O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (src.health > 0)
|
||||
src.adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
src.adjustFireLoss(40)
|
||||
src.updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/pai/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
|
||||
@@ -179,7 +179,7 @@ var/list/robot_verbs_default = list(
|
||||
if(T) mmi.loc = T
|
||||
if(mind) mind.transfer_to(mmi.brainmob)
|
||||
mmi = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/proc/pick_module()
|
||||
if(module)
|
||||
@@ -528,18 +528,6 @@ var/list/robot_verbs_default = list(
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/meteorhit(obj/O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [src] has been hit by [O]"), 1)
|
||||
//Foreach goto(19)
|
||||
if (health > 0)
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
adjustFireLoss(40)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj)
|
||||
..(Proj)
|
||||
updatehealth()
|
||||
@@ -1236,7 +1224,7 @@ var/list/robot_verbs_default = list(
|
||||
if(emagged)
|
||||
if(mmi)
|
||||
qdel(mmi)
|
||||
explosion(src.loc,1,2,4)
|
||||
explosion(src.loc,1,2,4,flame_range = 2)
|
||||
else
|
||||
explosion(src.loc,-1,0,2)
|
||||
gib()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/mob/living/simple_animal/bee/Destroy()
|
||||
if(parent)
|
||||
parent.owned_bee_swarms.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bee/Life()
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/mob/living/simple_animal/deer
|
||||
name = "deer"
|
||||
desc = "A strong, brave deer."
|
||||
icon_state = "deer"
|
||||
icon_living = "deer"
|
||||
icon_dead = "deer_dead"
|
||||
speak = list("snorts")
|
||||
speak_emote = list("snorts")
|
||||
emote_see = list("shakes its head")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 0 //I'm so funny
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
meat_amount = 3
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
/mob/living/simple_animal/spiderbot/Destroy()
|
||||
eject_brain()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/New()
|
||||
|
||||
|
||||
@@ -170,16 +170,16 @@
|
||||
var/obj/O
|
||||
|
||||
//shards
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
if(prob(75))
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
if(prob(50))
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
if(prob(25))
|
||||
O = getFromPool(/obj/item/weapon/shard, loc)
|
||||
O = PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
step_to(O, get_turf(pick(view(7, src))))
|
||||
|
||||
//rods
|
||||
@@ -270,7 +270,7 @@
|
||||
C.name = "Corrupted drone morality core"
|
||||
C.origin_tech = "illegal=[rand(3,6)]"
|
||||
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/beam/drone
|
||||
damage = 15
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
/mob/living/simple_animal/hostile/spaceWorm/Destroy()
|
||||
if(previousWorm)
|
||||
previousWorm.Detach(0)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
//Move all segments if one piece moves.
|
||||
|
||||
@@ -140,7 +140,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
del(src)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
src.health -= 15
|
||||
@@ -165,12 +165,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/tribble_cage/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/tribble_cage/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
dead_mob_list -= src
|
||||
living_mob_list -= src
|
||||
ghostize()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/New()
|
||||
mob_list += src
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
affecting.layer = initial(affecting.layer)
|
||||
affecting.grabbed_by -= src
|
||||
del(hud)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
#undef EAT_TIME_XENO
|
||||
#undef EAT_TIME_FAT
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/obj/item/weapon/katana/energy
|
||||
name = "energy katana"
|
||||
desc = "A katana infused with a strong energy"
|
||||
@@ -9,6 +7,8 @@
|
||||
force = 40
|
||||
throwforce = 20
|
||||
var/cooldown = 0 // Because spam aint cool, yo.
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
|
||||
|
||||
/obj/item/weapon/katana/energy/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(user, 'sound/weapons/blade1.ogg', 50, 1, -1)
|
||||
@@ -18,8 +18,9 @@
|
||||
if(!user || !target)
|
||||
return
|
||||
|
||||
if(proximity_flag && user.mind.special_role == "Ninja" && !cooldown)
|
||||
if(proximity_flag && user.mind.special_role == "Ninja" && !cooldown && isobj(target))
|
||||
cooldown = 1
|
||||
spark_system.start()
|
||||
playsound(user, "sparks", 50, 1)
|
||||
playsound(user, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
user.visible_message("<span class='danger'>[user] masterfully slices [target]!</span>", "<span class='notice'>You masterfully slice [target]!</span>")
|
||||
@@ -27,3 +28,58 @@
|
||||
sleep(15)
|
||||
cooldown = 0
|
||||
|
||||
/*/obj/item/weapon/katana/energy/throw_impact(atom/hit_atom)
|
||||
if(ishuman(hit_atom))
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/SN = H.wear_suit
|
||||
if(SN.energyKatana && SN.energyKatana == src)
|
||||
returnToOwner(H, 0, 1)
|
||||
return
|
||||
..()*/
|
||||
|
||||
|
||||
/obj/item/weapon/katana/energy/proc/returnToOwner(var/mob/living/carbon/human/user, var/doSpark = 1, var/caught = 0)
|
||||
if(!istype(user))
|
||||
return
|
||||
loc = get_turf(src)
|
||||
|
||||
if(doSpark)
|
||||
spark_system.start()
|
||||
playsound(get_turf(src), "sparks", 50, 1)
|
||||
|
||||
var/msg = ""
|
||||
|
||||
if(user.put_in_hands(src))
|
||||
msg = "Your Energy Katana teleports into your hand!"
|
||||
else if(user.equip_to_slot_if_possible(src, slot_belt, 0, 1, 1))
|
||||
msg = "Your Energy Katana teleports back to you, sheathing itself as it does so!</span>"
|
||||
else
|
||||
loc = get_turf(user)
|
||||
msg = "Your Energy Katana teleports to your location!"
|
||||
|
||||
if(caught)
|
||||
if(loc == user)
|
||||
msg = "You catch your Energy Katana!"
|
||||
else
|
||||
msg = "Your Energy Katana lands at your feet!"
|
||||
|
||||
if(msg)
|
||||
user << "<span class='notice'>[msg]</span>"
|
||||
|
||||
/obj/item/weapon/katana/energy/New()
|
||||
..()
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
|
||||
/obj/item/weapon/katana/energy/Del()
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
..()
|
||||
|
||||
/obj/item/weapon/katana/energy/Destroy()
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
return ..()
|
||||
@@ -1,107 +0,0 @@
|
||||
/obj/item/clothing/glasses/hud/space_ninja
|
||||
name = "vision enhancement implant"
|
||||
desc = "A high-tech ocular implant designed for Spider Clan operatives."
|
||||
icon_state = "cybereye-off"
|
||||
item_state = "eyepatch"
|
||||
flags = NODROP
|
||||
|
||||
var/enabled = 0
|
||||
var/energyConsumption = 0
|
||||
var/antagHUDEnabled = 0
|
||||
var/mesonEnabled = 0
|
||||
var/materialEnabled = 0
|
||||
var/thermalEnabled = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/space_ninja/verb/modifyHUD(mob/user as mob)
|
||||
set category = "Space Ninja - Equiptment"
|
||||
set name = "Modify Vision"
|
||||
|
||||
if(usr.mind.special_role != "Ninja")
|
||||
usr << "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked."
|
||||
return
|
||||
|
||||
if(!enabled) // If the Ninja's suit is on and connected.
|
||||
usr << "<span style='color: #ff0000;'><b>ERROR: </b>No power supply detected, cannot activate optical implant.</span>"
|
||||
return
|
||||
|
||||
if(!user) // The user var is, so far as I can tell, required to refresh the window after each click.
|
||||
user = usr
|
||||
|
||||
/*
|
||||
* Each vision type the Ninja enables will drain more from his suit's battery per tick.
|
||||
* For instance, if the Ninja were to rn around with thermals and AntagHUD on he would be losing an additional 10 energy per tick.
|
||||
* Current vision modes are:
|
||||
* - Night
|
||||
* - Meson (Turfs)
|
||||
* - Material (Objects)
|
||||
* - Thermal (Mobs)
|
||||
* - Antag HUD
|
||||
*
|
||||
* -Dave
|
||||
*/
|
||||
var/dat = {"
|
||||
<center>Night Vision (2E) - <a href='?src=\ref[src];night=night'>[darkness_view ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Meson Scanner (2E) - <a href='?src=\ref[src];meson=meson'>[mesonEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Material Scanner (4E) - <a href='?src=\ref[src];material=material'>[materialEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Thermal Scanner (4E) - <a href='?src=\ref[src];thermal=thermal'>[thermalEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Threat Identification HUD (6E) - <a href='?src=\ref[src];antagHUD=antagHUD'>[antagHUDEnabled ? "ENABLED" : "DISABLED"]</a></center>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(user, "SpiderOS", "SpiderOS Optical Interface", 310, 150)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/hud/space_ninja/Topic(href, href_list)
|
||||
if(usr.stat != 0 || !enabled)
|
||||
return 1
|
||||
|
||||
if(href_list["night"])
|
||||
darkness_view = (darkness_view ? 0 : 8)
|
||||
see_darkness = (darkness_view ? 0 : 1)
|
||||
energyConsumption += (darkness_view ? 2 : -2)
|
||||
usr << "Light amplification <span style='color: #0000ff;'><b>[(darkness_view ? "ENABLED" : "DISABLED")]</b></span>."
|
||||
|
||||
else if(href_list["meson"])
|
||||
mesonEnabled = (mesonEnabled ? 0 : 1)
|
||||
|
||||
if(mesonEnabled)
|
||||
vision_flags |= SEE_TURFS
|
||||
else
|
||||
vision_flags &= ~SEE_TURFS
|
||||
|
||||
energyConsumption += (mesonEnabled ? 2 : -2)
|
||||
usr << "Meson scanning <span style='color: #0000ff;'><b>[(mesonEnabled ? "ENABLED" : "DISABLED")]</b></span>."
|
||||
|
||||
else if(href_list["material"])
|
||||
materialEnabled = (materialEnabled ? 0 : 1)
|
||||
|
||||
if(materialEnabled)
|
||||
vision_flags |= SEE_OBJS
|
||||
else
|
||||
vision_flags &= ~SEE_OBJS
|
||||
|
||||
energyConsumption += (materialEnabled ? 4 : -4)
|
||||
usr << "Material scanning <span style='color: #0000ff;'><b>[(materialEnabled ? "ENABLED" : "DISABLED")]</b></span>."
|
||||
|
||||
else if(href_list["thermal"])
|
||||
thermalEnabled = (thermalEnabled ? 0 : 1)
|
||||
|
||||
if(thermalEnabled)
|
||||
vision_flags |= SEE_MOBS
|
||||
invisa_view = 2
|
||||
else
|
||||
vision_flags &= ~SEE_MOBS
|
||||
invisa_view = 0
|
||||
|
||||
energyConsumption += (thermalEnabled ? 4 : -4)
|
||||
usr << "Thermal scanning <span style='color: #0000ff;'><b>[(thermalEnabled ? "ENABLED" : "DISABLED")]</b></span>."
|
||||
|
||||
else if(href_list["antagHUD"])
|
||||
antagHUDEnabled = (antagHUDEnabled ? 0 : 1)
|
||||
energyConsumption += (antagHUDEnabled ? 6 : -6)
|
||||
usr << "Threat identification HUD <span style='color: #0000ff;'><b>[(antagHUDEnabled ? "ENABLED" : "DISABLED")]</b></span>."
|
||||
|
||||
modifyHUD(usr) // Re-call the verb to get a fresh version of the window.
|
||||
return
|
||||
|
||||
@@ -26,7 +26,6 @@ Contents:
|
||||
var/obj/item/clothing/gloves/space_ninja/suitGloves
|
||||
var/obj/item/clothing/shoes/space_ninja/suitShoes
|
||||
var/obj/item/clothing/mask/gas/voice/space_ninja/suitMask
|
||||
var/obj/item/clothing/glasses/hud/space_ninja/suitGlasses
|
||||
var/mob/living/carbon/human/suitOccupant
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/toggle_suit_lock(mob/living/carbon/human/user)
|
||||
@@ -46,12 +45,6 @@ Contents:
|
||||
if(!istype(user.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>ERROR:</b> Unable to locate mask.\nABORTING...</span>"
|
||||
return 0
|
||||
if(!istype(user.glasses, /obj/item/clothing/glasses/hud/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>WARNING:</b> Unable to locate eye gear, vision enhancement unavailable.</span><span style='color: #0000ff;'>\nProceeding...</span>"
|
||||
else
|
||||
suitGlasses = user.glasses
|
||||
suitGlasses.enabled = 1
|
||||
suitGlasses.icon_state = "cybereye-green"
|
||||
|
||||
suitHood = user.head
|
||||
suitMask = user.wear_mask
|
||||
@@ -77,9 +70,6 @@ Contents:
|
||||
flags &= ~NODROP
|
||||
suitHood.flags &= ~NODROP
|
||||
suitMask.flags &= ~NODROP
|
||||
if(suitGlasses)
|
||||
suitGlasses.enabled = 0
|
||||
suitGlasses.icon_state = "cybereye-off"
|
||||
suitGloves.flags &= ~NODROP
|
||||
suitGloves.pickpocket = 0
|
||||
suitShoes.flags &= ~NODROP
|
||||
@@ -90,7 +80,6 @@ Contents:
|
||||
|
||||
suitHood = null
|
||||
suitMask = null
|
||||
suitGlasses = null
|
||||
suitGloves = null
|
||||
suitShoes = null
|
||||
suitOccupant = null
|
||||
|
||||
@@ -132,10 +132,10 @@
|
||||
/obj/machinery/photocopier/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
if(toner > 0)
|
||||
new /obj/effect/decal/cleanable/blood/oil(get_turf(src))
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
/obj/machinery/photocopier/blob_act()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
if(toner > 0)
|
||||
new /obj/effect/decal/cleanable/blood/oil(get_turf(src))
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
/tg/station13 /atom/movable Pool:
|
||||
---------------------------------
|
||||
By RemieRichards
|
||||
Creation/Deletion is laggy, so let's reduce reuse and recycle!
|
||||
Locked to /atom/movable and it's subtypes due to Loc being a const var on /atom
|
||||
but being read&write on /movable due to how they... move.
|
||||
Usage:
|
||||
To get a object, just called PoolOrNew(type, list of args to pass to New)
|
||||
To put a object back in the pool, call place in pool.
|
||||
This will call destroy on the object, set its loc to null,
|
||||
and reset all of its vars to their default
|
||||
You can override your object's destroy to return QDEL_HINT_PLACEINPOOL
|
||||
to ensure its always placed in this pool (this will only be acted on if qdel calls destroy, and destroy will not get called twice)
|
||||
*/
|
||||
|
||||
var/global/list/GlobalPool = list()
|
||||
|
||||
//You'll be using this proc 90% of the time.
|
||||
//It grabs a type from the pool if it can
|
||||
//And if it can't, it creates one
|
||||
//The pool is flexible and will expand to fit
|
||||
//The new created atom when it eventually
|
||||
//Goes into the pool
|
||||
|
||||
//Second argument can be a new location
|
||||
//Or a list of arguments
|
||||
//Either way it gets passed to new
|
||||
|
||||
/proc/PoolOrNew(var/get_type,var/second_arg)
|
||||
if(!get_type)
|
||||
return
|
||||
|
||||
var/atom/movable/AM
|
||||
AM = GetFromPool(get_type,second_arg)
|
||||
|
||||
if(!AM)
|
||||
if(ispath(get_type))
|
||||
if(islist(second_arg))
|
||||
AM = new get_type (arglist(second_arg))
|
||||
else
|
||||
AM = new get_type (second_arg)
|
||||
|
||||
if(AM)
|
||||
return AM
|
||||
|
||||
|
||||
|
||||
/proc/GetFromPool(var/get_type,var/second_arg)
|
||||
if(!get_type)
|
||||
return 0
|
||||
|
||||
if(isnull(GlobalPool[get_type]))
|
||||
return 0
|
||||
|
||||
if(length(GlobalPool[get_type]) == 0)
|
||||
return 0
|
||||
|
||||
var/atom/movable/AM = pick_n_take(GlobalPool[get_type])
|
||||
if(AM)
|
||||
AM.ResetVars()
|
||||
if(islist(second_arg))
|
||||
AM.loc = second_arg[1]
|
||||
AM.New(arglist(second_arg))
|
||||
else
|
||||
AM.loc = second_arg
|
||||
AM.New(second_arg)
|
||||
return AM
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/proc/PlaceInPool(var/atom/movable/AM, destroy = 1)
|
||||
if(!istype(AM))
|
||||
return
|
||||
|
||||
if(AM in GlobalPool[AM.type])
|
||||
return
|
||||
|
||||
if(!GlobalPool[AM.type])
|
||||
GlobalPool[AM.type] = list()
|
||||
|
||||
GlobalPool[AM.type] |= AM
|
||||
|
||||
if (destroy)
|
||||
AM.Destroy()
|
||||
|
||||
AM.ResetVars()
|
||||
|
||||
|
||||
|
||||
/atom/movable/proc/ResetVars()
|
||||
var/list/excluded = list("animate_movement", "loc", "locs", "parent_type", "vars", "verbs", "type")
|
||||
|
||||
for(var/V in vars)
|
||||
if(V in excluded)
|
||||
continue
|
||||
|
||||
vars[V] = initial(vars[V])
|
||||
|
||||
vars["loc"] = null
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/machinery/power/am_control_unit/Destroy()//Perhaps damage and run stability checks rather than just del on the others
|
||||
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
|
||||
del(AMS)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/process()
|
||||
|
||||
@@ -70,8 +70,7 @@ proc/cardinalrange(var/center)
|
||||
if(processing) shutdown_core()
|
||||
visible_message("\red The [src.name] melts!")
|
||||
//Might want to have it leave a mess on the floor but no sprites for now
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
|
||||
+17
-29
@@ -28,11 +28,11 @@
|
||||
#define APC_UPOVERLAY_ENVIRON2 2048
|
||||
#define APC_UPOVERLAY_LOCKED 4096
|
||||
|
||||
#define APC_UPDATE_ICON_COOLDOWN 100 // 10 seconds
|
||||
#define APC_UPDATE_ICON_COOLDOWN 200 // 20 seconds
|
||||
|
||||
|
||||
// the Area Power Controller (APC), formerly Power Distribution Unit (PDU)
|
||||
// one per area, needs wire conection to power network
|
||||
// one per area, needs wire conection to power network through a terminal
|
||||
|
||||
// controls power to devices in that area
|
||||
// may be opened to change power cell
|
||||
@@ -592,14 +592,10 @@
|
||||
user << "Nothing happens."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the APC interface."
|
||||
update_icon()
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the APC interface."
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the APC interface."
|
||||
update_icon()
|
||||
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
/obj/machinery/power/apc/attack_hand(mob/user)
|
||||
@@ -1068,7 +1064,7 @@
|
||||
|
||||
/obj/machinery/power/apc/add_load(var/amount)
|
||||
if(terminal && terminal.powernet)
|
||||
terminal.powernet.newload += amount
|
||||
terminal.powernet.load += amount
|
||||
|
||||
/obj/machinery/power/apc/avail()
|
||||
if(terminal)
|
||||
@@ -1106,10 +1102,6 @@
|
||||
else
|
||||
main_status = 2
|
||||
|
||||
var/perapc = 0
|
||||
if(terminal && terminal.powernet)
|
||||
perapc = terminal.powernet.perapc
|
||||
|
||||
//if(debug)
|
||||
//world << "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light]"
|
||||
|
||||
@@ -1117,12 +1109,12 @@
|
||||
var/cell_charge = cell.charge
|
||||
var/cell_maxcharge = cell.maxcharge
|
||||
|
||||
// draw power from cell as before
|
||||
// draw power from cell as before to power the area
|
||||
|
||||
var/cellused = min(cell_charge, CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell
|
||||
cell.use(cellused)
|
||||
|
||||
if(excess > 0 || perapc > lastused_total) // if power excess, or enough anyway, recharge the cell
|
||||
if(excess > lastused_total) // if power excess recharge the cell
|
||||
// by the same amount just used
|
||||
cell.give(cellused)
|
||||
add_load(cellused/CELLRATE) // add the load used to recharge the cell
|
||||
@@ -1130,10 +1122,10 @@
|
||||
|
||||
else // no excess, and not enough per-apc
|
||||
|
||||
if( (cell_charge/CELLRATE+perapc) >= lastused_total) // can we draw enough from cell+grid to cover last usage?
|
||||
if( (cell_charge/CELLRATE + excess) >= lastused_total) // can we draw enough from cell+grid to cover last usage?
|
||||
|
||||
cell_charge = min(cell_maxcharge, cell_charge + CELLRATE * perapc) //recharge with what we can
|
||||
add_load(perapc) // so draw what we can from the grid
|
||||
cell_charge = min(cell_maxcharge, cell_charge + CELLRATE * excess) //recharge with what we can
|
||||
add_load(excess) // so draw what we can from the grid
|
||||
charging = 0
|
||||
|
||||
else if (autoflag != 0) // not enough power available to run the last tick!
|
||||
@@ -1190,8 +1182,8 @@
|
||||
|
||||
if(chargemode && charging == 1 && operating)
|
||||
if(excess > 0) // check to make sure we have enough to charge
|
||||
// Max charge is perapc share, capped to cell capacity, or % per second constant (Whichever is smallest)
|
||||
var/ch = min(perapc*CELLRATE, (cell_maxcharge - cell_charge), (cell_maxcharge*CHARGELEVEL))
|
||||
// Max charge is capped to % per second constant
|
||||
var/ch = min(excess*CELLRATE, cell.maxcharge*CHARGELEVEL)
|
||||
add_load(ch/CELLRATE) // Removes the power we're taking from the grid
|
||||
cell.give(ch) // actually recharge the cell
|
||||
|
||||
@@ -1201,7 +1193,8 @@
|
||||
|
||||
// show cell as fully charged if so
|
||||
|
||||
if(cell.charge >= cell_maxcharge)
|
||||
if(cell.charge >= cell.maxcharge)
|
||||
cell.charge = cell.maxcharge
|
||||
charging = 2
|
||||
|
||||
if(chargemode)
|
||||
@@ -1261,11 +1254,6 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
|
||||
|
||||
// damage and destruction acts
|
||||
|
||||
/obj/machinery/power/apc/meteorhit(var/obj/O as obj)
|
||||
|
||||
set_broken()
|
||||
return
|
||||
|
||||
/obj/machinery/power/apc/emp_act(severity)
|
||||
if(cell)
|
||||
cell.emp_act(severity)
|
||||
@@ -1342,7 +1330,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
|
||||
area.power_change()
|
||||
if(occupant)
|
||||
malfvacate(1)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/apc/proc/shock(mob/user, prb)
|
||||
if(!prob(prb))
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
attached.anchored = 0
|
||||
attached.attached = null
|
||||
attached = null*/
|
||||
..() // then go ahead and delete the cable
|
||||
return ..() // then go ahead and delete the cable
|
||||
|
||||
/obj/structure/cable/hide(var/i)
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
if( !(pn_input.avail >= LOGIC_HIGH))
|
||||
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
|
||||
else
|
||||
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
pn_output.load += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
if( (pn_input1.avail >= LOGIC_HIGH) && (pn_input2.avail >= LOGIC_HIGH) )
|
||||
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
|
||||
else
|
||||
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
pn_output.load += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
|
||||
//OR GATE
|
||||
/obj/machinery/logic/twoinput/or/process()
|
||||
@@ -222,7 +222,7 @@
|
||||
if( (pn_input1.avail >= LOGIC_HIGH) || (pn_input2.avail >= LOGIC_HIGH) )
|
||||
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
|
||||
else
|
||||
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
pn_output.load += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
|
||||
//XOR GATE
|
||||
/obj/machinery/logic/twoinput/xor/process()
|
||||
@@ -242,7 +242,7 @@
|
||||
if( (pn_input1.avail >= LOGIC_HIGH) != (pn_input2.avail >= LOGIC_HIGH) )
|
||||
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
|
||||
else
|
||||
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
pn_output.load += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
|
||||
//XNOR GATE (EQUIVALENCE)
|
||||
/obj/machinery/logic/twoinput/xnor/process()
|
||||
@@ -262,7 +262,7 @@
|
||||
if( (pn_input1.avail >= LOGIC_HIGH) == (pn_input2.avail >= LOGIC_HIGH) )
|
||||
pn_output.newavail = max(pn_output.avail, LOGIC_HIGH) //Set the output avilable power to 5 or whatever it was before.
|
||||
else
|
||||
pn_output.newload += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
pn_output.load += LOGIC_HIGH //Otherwise increase the load to 5
|
||||
|
||||
#define RELAY_POWER_TRANSFER 2000 //How much power a relay transfers through.
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
return
|
||||
|
||||
if(pn_input2.avail >= RELAY_POWER_TRANSFER)
|
||||
pn_input2.newload += RELAY_POWER_TRANSFER
|
||||
pn_input2.load += RELAY_POWER_TRANSFER
|
||||
pn_output.newavail += RELAY_POWER_TRANSFER
|
||||
|
||||
|
||||
|
||||
@@ -110,9 +110,7 @@
|
||||
message_admins("LOG: Rigged power cell explosion, last touched by [fingerprintslast]")
|
||||
|
||||
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
|
||||
spawn(1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/corrupt()
|
||||
charge /= 2
|
||||
|
||||
@@ -54,7 +54,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
set_broken()
|
||||
if(main_part)
|
||||
qdel(main_part)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//
|
||||
// Part generator which is mostly there for looks
|
||||
@@ -126,7 +126,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
if (!(A.z in config.station_levels)) continue
|
||||
A.gravitychange(0,A)
|
||||
shake_everyone()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -165,19 +165,6 @@
|
||||
desc = "A small lighting fixture."
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
|
||||
// the desk lamps are a bit special
|
||||
/obj/machinery/light/small/lamp
|
||||
name = "desk lamp"
|
||||
icon_state = "lamp1"
|
||||
base_state = "lamp"
|
||||
desc = "A desk lamp with an adjustable mount."
|
||||
|
||||
// green-shaded desk lamp
|
||||
/obj/machinery/light/small/lamp/green
|
||||
desc = "A classic green-shaded desk lamp."
|
||||
icon_state = "lampgreen1"
|
||||
base_state = "lampgreen"
|
||||
|
||||
/obj/machinery/light/spot
|
||||
name = "spotlight"
|
||||
fitting = "large tube"
|
||||
@@ -224,7 +211,7 @@
|
||||
if(A)
|
||||
on = 0
|
||||
// A.update_lights()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ display round(lastgen) and plasmatank amount
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/Destroy()
|
||||
DropFuel()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/RefreshParts()
|
||||
var/temp_rating = 0
|
||||
|
||||
+23
-50
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/machinery/power/Destroy()
|
||||
disconnect_from_network()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// common helper procs for all power machines
|
||||
/obj/machinery/power/proc/add_avail(var/amount)
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/machinery/power/proc/add_load(var/amount)
|
||||
if(powernet)
|
||||
powernet.newload += amount
|
||||
powernet.load += amount
|
||||
|
||||
/obj/machinery/power/proc/surplus()
|
||||
if(powernet)
|
||||
@@ -313,55 +313,25 @@
|
||||
|
||||
|
||||
/datum/powernet/proc/reset()
|
||||
load = newload
|
||||
newload = 0
|
||||
|
||||
//see if there's a surplus of power remaining in the powernet and stores unused power in the SMES
|
||||
netexcess = avail - load
|
||||
|
||||
if(netexcess > 100 && nodes && nodes.len) // if there was excess power last cycle
|
||||
for(var/obj/machinery/power/smes/S in nodes) // find the SMESes in the network
|
||||
S.restore() // and restore some of the power that was used
|
||||
|
||||
//updates the viewed load (as seen on power computers)
|
||||
viewload = 0.8*viewload + 0.2*load
|
||||
viewload = round(viewload)
|
||||
|
||||
//reset the powernet
|
||||
load = 0
|
||||
avail = newavail
|
||||
newavail = 0
|
||||
|
||||
|
||||
viewload = 0.8*viewload + 0.2*load
|
||||
|
||||
viewload = round(viewload)
|
||||
|
||||
var/numapc = 0
|
||||
|
||||
if(nodes && nodes.len) // Added to fix a bad list bug -- TLE
|
||||
for(var/obj/machinery/power/terminal/term in nodes)
|
||||
if( istype( term.master, /obj/machinery/power/apc ) )
|
||||
numapc++
|
||||
|
||||
if(numapc)
|
||||
perapc = avail/numapc
|
||||
|
||||
netexcess = avail - load
|
||||
|
||||
if( netexcess > 100) // if there was excess power last cycle
|
||||
if(nodes && nodes.len)
|
||||
for(var/obj/machinery/power/smes/S in nodes) // find the SMESes in the network
|
||||
if(S.powernet == src)
|
||||
S.restore() // and restore some of the power that was used
|
||||
else
|
||||
error("[S.name] (\ref[S]) had a [S.powernet ? "different (\ref[S.powernet])" : "null"] powernet to our powernet (\ref[src]).")
|
||||
nodes.Remove(S)
|
||||
|
||||
/datum/powernet/proc/get_electrocute_damage()
|
||||
switch(avail)/*
|
||||
if (1300000 to INFINITY)
|
||||
return min(rand(70,150),rand(70,150))
|
||||
if (750000 to 1300000)
|
||||
return min(rand(50,115),rand(50,115))
|
||||
if (100000 to 750000-1)
|
||||
return min(rand(35,101),rand(35,101))
|
||||
if (75000 to 100000-1)
|
||||
return min(rand(30,95),rand(30,95))
|
||||
if (50000 to 75000-1)
|
||||
return min(rand(25,80),rand(25,80))
|
||||
if (25000 to 50000-1)
|
||||
return min(rand(20,70),rand(20,70))
|
||||
if (10000 to 25000-1)
|
||||
return min(rand(20,65),rand(20,65))
|
||||
if (1000 to 10000-1)
|
||||
return min(rand(10,20),rand(10,20))*/
|
||||
switch(avail)
|
||||
if (5000000 to INFINITY)
|
||||
return min(rand(200,300),rand(200,300))
|
||||
if (4000000 to 5000000)
|
||||
@@ -434,8 +404,11 @@
|
||||
return null
|
||||
|
||||
/area/proc/get_apc()
|
||||
var/obj/machinery/power/apc/FINDME = locate() in src
|
||||
if (FINDME)
|
||||
// This was a simple locate() in src, but an unresolved BYOND bug causes trying to locate() in an
|
||||
// area to take an inconceivably long time, especially for large areas.
|
||||
// See: http://www.byond.com/forum/?post=1860571
|
||||
var/obj/machinery/power/apc/FINDME
|
||||
for(FINDME in src)
|
||||
return FINDME
|
||||
|
||||
|
||||
@@ -502,7 +475,7 @@
|
||||
source_area.use_power(drained_energy/CELLRATE)
|
||||
else if (istype(power_source,/datum/powernet))
|
||||
var/drained_power = drained_energy/CELLRATE //convert from "joules" to "watts"
|
||||
PN.newload+=drained_power
|
||||
PN.load+=drained_power
|
||||
else if (istype(power_source, /obj/item/weapon/stock_parts/cell))
|
||||
cell.use(drained_energy)
|
||||
return drained_energy
|
||||
|
||||
@@ -23,7 +23,7 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
/obj/machinery/power/rad_collector/Destroy()
|
||||
rad_collectors -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
if(P)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
FG1.cleanup()
|
||||
if(FG2 && !FG2.clean_up)
|
||||
FG2.cleanup()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/containment_field/attack_hand(mob/user as mob)
|
||||
if(get_dist(src, user) > 1)
|
||||
@@ -36,8 +36,6 @@
|
||||
/obj/machinery/containment_field/ex_act(severity)
|
||||
return 0
|
||||
|
||||
/obj/machinery/containment_field/meteorhit()
|
||||
return 0
|
||||
|
||||
/obj/machinery/containment_field/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(istype(AM,/mob/living/silicon) && prob(40))
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
msg_admin_attack("Emitter deleted at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter deleted at ([x],[y],[z])")
|
||||
investigate_log("<font color='red'>deleted</font> at ([x],[y],[z])","singulo")
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/update_icon()
|
||||
if (active && powernet && avail(active_power_usage))
|
||||
@@ -135,8 +135,6 @@
|
||||
src.use_power = 1 */
|
||||
return 1
|
||||
|
||||
/obj/machinery/containment_field/meteorhit()
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/emitter/process()
|
||||
if(stat & (BROKEN))
|
||||
@@ -167,13 +165,16 @@
|
||||
else
|
||||
src.fire_delay = rand(20,100)
|
||||
src.shot_number = 0
|
||||
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter(src.loc)
|
||||
|
||||
var/obj/item/projectile/beam/emitter/A = PoolOrNew(/obj/item/projectile/beam/emitter,src.loc)
|
||||
|
||||
A.dir = src.dir
|
||||
playsound(get_turf(src), 'sound/weapons/emitter.ogg', 25, 1)
|
||||
if(prob(35))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
A.dir = src.dir
|
||||
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
A.yo = 20
|
||||
|
||||
@@ -163,8 +163,6 @@ field_generator power level display
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/containment_field/meteorhit()
|
||||
return 0
|
||||
|
||||
/obj/machinery/field_generator/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet")
|
||||
@@ -175,7 +173,7 @@ field_generator power level display
|
||||
|
||||
/obj/machinery/field_generator/Destroy()
|
||||
src.cleanup()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -157,11 +157,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/meteorhit()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/particle_accelerator/update_icon()
|
||||
switch(construction_state)
|
||||
if(0,1)
|
||||
@@ -344,12 +339,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/meteorhit()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/proc/update_state()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
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/consumedSupermatter = 0 //If the singularity has eaten a supermatter shard and can go to stage six
|
||||
allow_spin = 0
|
||||
|
||||
/obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
|
||||
//CARN: admin-alert for chuckle-fuckery.
|
||||
@@ -42,7 +43,7 @@
|
||||
|
||||
/obj/singularity/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/singularity/Move(atom/newloc, direct)
|
||||
if(current_size >= STAGE_FIVE || check_turfs_in(direct))
|
||||
|
||||
+13
-13
@@ -3,6 +3,7 @@
|
||||
|
||||
#define SMESMAXCHARGELEVEL 200000
|
||||
#define SMESMAXOUTPUT 200000
|
||||
#define SMESRATE 0.05 // rate of internal charge to external power
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +45,7 @@
|
||||
spawn(5)
|
||||
if(!powernet)
|
||||
connect_to_network()
|
||||
|
||||
|
||||
dir_loop:
|
||||
for(var/d in cardinal)
|
||||
var/turf/T = get_step(src, d)
|
||||
@@ -71,7 +72,7 @@
|
||||
for(var/obj/item/weapon/stock_parts/cell/PC in component_parts)
|
||||
C += PC.maxcharge
|
||||
capacity = C / (15000) * 1e6
|
||||
|
||||
|
||||
/obj/machinery/power/smes/proc/updateicon()
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN) return
|
||||
@@ -218,28 +219,27 @@
|
||||
investigate_log("<font color='red'>deleted</font> at ([area.name])","singulo")
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// create a terminal object pointing towards the SMES
|
||||
// wires will attach to this
|
||||
/obj/machinery/power/smes/proc/make_terminal(var/turf/T)
|
||||
terminal = new/obj/machinery/power/terminal(T)
|
||||
terminal.dir = get_dir(T,src)
|
||||
terminal.master = src
|
||||
|
||||
terminal.master = src
|
||||
|
||||
/obj/machinery/power/smes/proc/disconnect_terminal()
|
||||
if(terminal)
|
||||
terminal.master = null
|
||||
terminal = null
|
||||
|
||||
terminal = null
|
||||
|
||||
/obj/machinery/power/smes/proc/chargedisplay()
|
||||
return round(5.5*charge/capacity)
|
||||
|
||||
#define SMESRATE 0.05 // rate of internal charge to external power
|
||||
|
||||
|
||||
/obj/machinery/power/smes/process()
|
||||
if(stat & BROKEN)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
//store machine state to see if we need to update the icon overlays
|
||||
@@ -326,16 +326,16 @@
|
||||
|
||||
/obj/machinery/power/smes/add_load(var/amount)
|
||||
if(terminal && terminal.powernet)
|
||||
terminal.powernet.newload += amount
|
||||
terminal.powernet.load += amount
|
||||
|
||||
|
||||
/obj/machinery/power/smes/attack_ai(mob/user)
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
/obj/machinery/power/smes/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/power/smes/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
@@ -29,7 +29,7 @@ var/list/solars_list = list()
|
||||
|
||||
/obj/machinery/power/solar/Destroy()
|
||||
unset_control() //remove from control computer
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//set the control of the panel to a given computer if closer than SOLAR_MAX_DIST
|
||||
/obj/machinery/power/solar/proc/set_control(var/obj/machinery/power/solar_control/SC)
|
||||
@@ -304,7 +304,7 @@ var/list/solars_list = list()
|
||||
M.unset_control()
|
||||
if(connected_tracker)
|
||||
connected_tracker.unset_control()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/solar_control/disconnect_from_network()
|
||||
..()
|
||||
@@ -386,7 +386,7 @@ var/list/solars_list = list()
|
||||
data["connected_panels"] = connected_panels.len
|
||||
data["connected_tracker"] = (connected_tracker ? 1 : 0)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420)
|
||||
ui.set_initial_data(data)
|
||||
@@ -446,7 +446,7 @@ var/list/solars_list = list()
|
||||
/obj/machinery/power/solar_control/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
if(href_list["rate_control"])
|
||||
if(href_list["cdir"])
|
||||
src.cdir = dd_range(0,359,(360+src.cdir+text2num(href_list["cdir"]))%360)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/machinery/power/tracker/Destroy()
|
||||
unset_control() //remove from control computer
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//set the control of the tracker to a given computer if closer than SOLAR_MAX_DIST
|
||||
/obj/machinery/power/tracker/proc/set_control(var/obj/machinery/power/solar_control/SC)
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
getFromPool(/obj/item/weapon/shard, loc)
|
||||
PoolOrNew(/obj/item/weapon/shard, loc)
|
||||
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
@@ -38,7 +38,7 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain/process()
|
||||
charge_tick++
|
||||
|
||||
@@ -312,7 +312,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
if(power_supply.charge == power_supply.maxcharge)
|
||||
@@ -369,7 +369,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
/obj/item/weapon/gun/energy/printer/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/printer/process()
|
||||
if(power_supply.charge == power_supply.maxcharge)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
if(power_supply.charge == power_supply.maxcharge)
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/process()
|
||||
charge_tick++
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/item/weapon/gun/magic/Destroy()
|
||||
if(can_charge) processing_objects.Remove(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/process()
|
||||
|
||||
@@ -148,6 +148,6 @@
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/fireball/zap_self(mob/living/user as mob)
|
||||
if(alert(user, "Zapping yourself with a wand of fireball is probably a bad idea, do it anyway?",, "Yes", "No") == "Yes" && charges && user.get_active_hand() == src && isliving(user))
|
||||
explosion(user.loc, -1, 0, 2, 3, 0)
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
..()
|
||||
@@ -75,6 +75,9 @@
|
||||
/obj/item/projectile/beam/emitter/singularity_pull()
|
||||
return //don't want the emitters to miss
|
||||
|
||||
/obj/item/projectile/beam/emitter/Destroy()
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
/obj/item/projectile/lasertag
|
||||
name = "laser tag beam"
|
||||
icon_state = "omnilaser"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/item/projectile/magic/fireball/on_hit(var/target)
|
||||
var/turf/T = get_turf(target)
|
||||
explosion(T, -1, 0, 2, 3, 0)
|
||||
explosion(T, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
if(ismob(target)) //multiple flavors of pain
|
||||
var/mob/living/M = target
|
||||
M.take_overall_damage(0,10) //between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
flag = "bullet"
|
||||
|
||||
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = 0)
|
||||
explosion(target, -1, 0, 2, 1, 0)
|
||||
..()
|
||||
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/temp
|
||||
@@ -75,7 +76,7 @@
|
||||
if(src)//Do not add to this if() statement, otherwise the meteor won't delete them
|
||||
if(A)
|
||||
|
||||
A.meteorhit(src)
|
||||
A.ex_act(2)
|
||||
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
|
||||
for(var/mob/M in range(10, src))
|
||||
@@ -217,6 +218,7 @@ obj/item/projectile/kinetic/New()
|
||||
weaken = 5
|
||||
|
||||
/obj/item/projectile/bullet/frag12/on_hit(atom/target, blocked = 0)
|
||||
..()
|
||||
explosion(target, -1, 0, 1)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -441,6 +441,7 @@ datum
|
||||
if(!isnum(amount)) return 1
|
||||
update_total()
|
||||
if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen.
|
||||
if(amount <= 0) return 0
|
||||
chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems
|
||||
|
||||
for(var/A in reagent_list)
|
||||
@@ -632,4 +633,6 @@ atom/proc/create_reagents(var/max_vol)
|
||||
reagent.Destroy()
|
||||
|
||||
if(my_atom)
|
||||
my_atom = null
|
||||
my_atom = null
|
||||
|
||||
return ..()
|
||||
@@ -97,10 +97,6 @@
|
||||
if (prob(50))
|
||||
del(src)
|
||||
|
||||
/obj/machinery/chem_dispenser/meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
/**
|
||||
* The ui_interact proc is used to open and update Nano UIs
|
||||
* If ui_interact is not used then the UI will not update correctly
|
||||
@@ -401,10 +397,6 @@
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/chem_master/meteorhit()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/power_change()
|
||||
if(powered())
|
||||
stat &= ~NOPOWER
|
||||
|
||||
@@ -3224,3 +3224,5 @@ datum
|
||||
if(holder)
|
||||
holder.reagent_list -= src
|
||||
holder = null
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -108,7 +108,8 @@
|
||||
if(isnum(val))
|
||||
desired_temp = Clamp(desired_temp+val, 0, 1000)
|
||||
else if(val == "input")
|
||||
desired_temp = Clamp(input("Please input the target temperature", name) as num, 0, 1000)
|
||||
var/target = input("Please input the target temperature", name) as num
|
||||
desired_temp = Clamp(target, 0, 1000)
|
||||
else
|
||||
return 0
|
||||
. = 1
|
||||
|
||||
@@ -560,7 +560,7 @@ datum/reagent/atropine/on_mob_life(var/mob/living/M as mob)
|
||||
M.losebreath = 5
|
||||
if(M.confused > 60)
|
||||
M.confused += 5
|
||||
M.reagents.remove_reagent("sarin",10)
|
||||
M.reagents.remove_reagent("tabun",10)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user