mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
@@ -61,6 +61,7 @@
|
||||
#define FILE_DIR "code/game/machinery/kitchen"
|
||||
#define FILE_DIR "code/game/machinery/pipe"
|
||||
#define FILE_DIR "code/game/machinery/telecomms"
|
||||
#define FILE_DIR "code/game/magic"
|
||||
#define FILE_DIR "code/game/mecha"
|
||||
#define FILE_DIR "code/game/mecha/combat"
|
||||
#define FILE_DIR "code/game/mecha/equipment"
|
||||
@@ -69,6 +70,8 @@
|
||||
#define FILE_DIR "code/game/mecha/medical"
|
||||
#define FILE_DIR "code/game/mecha/working"
|
||||
#define FILE_DIR "code/game/objects"
|
||||
#define FILE_DIR "code/game/objects/closets"
|
||||
#define FILE_DIR "code/game/objects/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/devices"
|
||||
#define FILE_DIR "code/game/objects/devices/PDA"
|
||||
#define FILE_DIR "code/game/objects/effects"
|
||||
@@ -87,7 +90,10 @@
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/tanks"
|
||||
#define FILE_DIR "code/game/turfs"#define FILE_DIR "code/game/player"#define FILE_DIR "code/game/structure"#define FILE_DIR "code/game/vehicles"
|
||||
#define FILE_DIR "code/game/player"
|
||||
#define FILE_DIR "code/game/structure"
|
||||
#define FILE_DIR "code/game/turfs"
|
||||
#define FILE_DIR "code/game/vehicles"
|
||||
#define FILE_DIR "code/game/vehicles/airtight"
|
||||
#define FILE_DIR "code/game/verbs"
|
||||
#define FILE_DIR "code/js"
|
||||
@@ -112,10 +118,12 @@
|
||||
#define FILE_DIR "code/modules/critters"
|
||||
#define FILE_DIR "code/modules/critters/hivebots"
|
||||
#define FILE_DIR "code/modules/customitems"
|
||||
#define FILE_DIR "code/modules/DetectiveWork"
|
||||
#define FILE_DIR "code/modules/detectivework"
|
||||
#define FILE_DIR "code/modules/flufftext"
|
||||
#define FILE_DIR "code/modules/food"
|
||||
#define FILE_DIR "code/modules/library"#define FILE_DIR "code/modules/icon generation"#define FILE_DIR "code/modules/maps"
|
||||
#define FILE_DIR "code/modules/icon generation"
|
||||
#define FILE_DIR "code/modules/library"
|
||||
#define FILE_DIR "code/modules/maps"
|
||||
#define FILE_DIR "code/modules/mining"
|
||||
#define FILE_DIR "code/modules/mob"
|
||||
#define FILE_DIR "code/modules/mob/dead"
|
||||
@@ -887,10 +895,10 @@
|
||||
#include "code\modules\critters\hivebots\hivebot.dm"
|
||||
#include "code\modules\customitems\item_defines.dm"
|
||||
#include "code\modules\customitems\item_spawning.dm"
|
||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
||||
#include "code\modules\DetectiveWork\evidence.dm"
|
||||
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
|
||||
#include "code\modules\DetectiveWork\scanner.dm"
|
||||
#include "code\modules\detectivework\detective_work.dm"
|
||||
#include "code\modules\detectivework\evidence.dm"
|
||||
#include "code\modules\detectivework\footprints_and_rag.dm"
|
||||
#include "code\modules\detectivework\scanner.dm"
|
||||
#include "code\modules\flufftext\Dreaming.dm"
|
||||
#include "code\modules\flufftext\Hallucination.dm"
|
||||
#include "code\modules\flufftext\TextFilters.dm"
|
||||
@@ -1062,7 +1070,6 @@
|
||||
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
||||
#include "code\modules\mob\living\simple_animal\corgi.dm"
|
||||
#include "code\modules\mob\living\simple_animal\crab.dm"
|
||||
#include "code\modules\mob\living\simple_animal\kobold.dm"
|
||||
#include "code\modules\mob\living\simple_animal\life.dm"
|
||||
#include "code\modules\mob\living\simple_animal\mouse.dm"
|
||||
#include "code\modules\mob\living\simple_animal\mushroom.dm"
|
||||
|
||||
@@ -1,521 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
/proc/start_events()
|
||||
//changed to a while(1) loop since they are more efficient.
|
||||
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
|
||||
//and also to stop spawn copying variables from the game ticker
|
||||
spawn(3000)
|
||||
while(1)
|
||||
if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
|
||||
spawn(1)
|
||||
dust_swarm("weak")
|
||||
if (!event)
|
||||
//CARN: checks to see if random events are enabled.
|
||||
if(config.allow_random_events && prob(eventchance))
|
||||
event()
|
||||
hadevent = 1
|
||||
else
|
||||
Holiday_Random_Event()
|
||||
else
|
||||
event = 0
|
||||
sleep(1200)
|
||||
|
||||
/proc/event()
|
||||
event = 1
|
||||
|
||||
var/eventNumbersToPickFrom = list(1,2,4,5,6,7,8,9,10,11,12,13,14) //so ninjas don't cause "empty" events.
|
||||
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
eventNumbersToPickFrom += 3
|
||||
switch(pick(eventNumbersToPickFrom))
|
||||
if(1)
|
||||
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
|
||||
world << sound('sound/AI/meteors.ogg')
|
||||
spawn(100)
|
||||
meteor_wave()
|
||||
spawn_meteors()
|
||||
spawn(700)
|
||||
meteor_wave()
|
||||
spawn_meteors()
|
||||
|
||||
if(2)
|
||||
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('sound/AI/granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(50, 300))
|
||||
del(bh)
|
||||
/*
|
||||
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
|
||||
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('sound/AI/spanomalies.ogg')
|
||||
var/list/turfs = new
|
||||
var/turf/picked
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
turfs += T
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(prob(20))
|
||||
spawn(50+rand(0,3000))
|
||||
picked = pick(turfs)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal( T )
|
||||
P.target = picked
|
||||
P.creator = null
|
||||
P.icon = 'icons/obj/objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
spawn(rand(300,600))
|
||||
del(P)
|
||||
*/
|
||||
if(3)
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
|
||||
if(4)
|
||||
mini_blob_event()
|
||||
|
||||
if(5)
|
||||
high_radiation_event()
|
||||
if(6)
|
||||
viral_outbreak()
|
||||
if(7)
|
||||
alien_infestation()
|
||||
if(8)
|
||||
prison_break()
|
||||
if(9)
|
||||
carp_migration()
|
||||
if(10)
|
||||
immovablerod()
|
||||
if(11)
|
||||
lightsout(1,2)
|
||||
if(12)
|
||||
appendicitis()
|
||||
if(13)
|
||||
IonStorm()
|
||||
if(14)
|
||||
spacevine_infestation()
|
||||
|
||||
/proc/power_failure()
|
||||
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
|
||||
world << sound('sound/AI/poweroff.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
continue
|
||||
S.charge = 0
|
||||
S.output = 0
|
||||
S.online = 0
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
|
||||
var/list/skipped_areas = list(/area/engine/engineering, /area/turret_protected/ai)
|
||||
|
||||
for(var/area/A in world)
|
||||
if( !A.requires_power || A.always_unpowered )
|
||||
continue
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(A.contents)
|
||||
for(var/atom/AT in A.contents)
|
||||
if(AT.z != 1) //Only check one, it's enough.
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
A.power_light = 0
|
||||
A.power_equip = 0
|
||||
A.power_environ = 0
|
||||
A.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
var/area/A = get_area(C)
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore()
|
||||
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
world << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
S.online = 1
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
for(var/area/A in world)
|
||||
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
|
||||
A.power_light = 1
|
||||
A.power_equip = 1
|
||||
A.power_environ = 1
|
||||
A.power_change()
|
||||
|
||||
/proc/power_restore_quick()
|
||||
|
||||
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
world << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
S.online = 1
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
|
||||
/proc/appendicitis()
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
var/datum/disease/D = new /datum/disease/appendicitis
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
|
||||
/proc/viral_outbreak(var/virus = null)
|
||||
// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
// world << sound('sound/AI/outbreak7.ogg')
|
||||
var/virus_type
|
||||
if(!virus)
|
||||
virus_type = pick(/datum/disease/dnaspread,/datum/disease/flu,/datum/disease/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
|
||||
else
|
||||
switch(virus)
|
||||
if("fake gbs")
|
||||
virus_type = /datum/disease/fake_gbs
|
||||
if("gbs")
|
||||
virus_type = /datum/disease/gbs
|
||||
if("magnitis")
|
||||
virus_type = /datum/disease/magnitis
|
||||
if("rhumba beat")
|
||||
virus_type = /datum/disease/rhumba_beat
|
||||
if("brain rot")
|
||||
virus_type = /datum/disease/brainrot
|
||||
if("cold")
|
||||
virus_type = /datum/disease/cold
|
||||
if("retrovirus")
|
||||
virus_type = /datum/disease/dnaspread
|
||||
if("flu")
|
||||
virus_type = /datum/disease/flu
|
||||
// if("t-virus")
|
||||
// virus_type = /datum/disease/t_virus
|
||||
if("pierrot's throat")
|
||||
virus_type = /datum/disease/pierrot_throat
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
|
||||
continue
|
||||
var/datum/disease/dnaspread/D = new
|
||||
D.strain_data["name"] = H.real_name
|
||||
D.strain_data["UI"] = H.dna.uni_identity
|
||||
D.strain_data["SE"] = H.dna.struc_enzymes
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
else
|
||||
var/datum/disease/D = new virus_type
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak7.ogg')
|
||||
|
||||
/proc/alien_infestation(var/spawncount = 1) // -- TLE
|
||||
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
//world << sound('sound/AI/aliens.ogg')
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
var/list/candidates = list() //List of candidate KEYs to control the new larvae. ~Carn
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client.be_alien)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
if(!(G.mind && G.mind.current && G.mind.current != DEAD))
|
||||
candidates += G.key
|
||||
|
||||
if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
while((spawncount >= 1) && vents.len && candidates.len)
|
||||
|
||||
var/obj/vent = pick(vents)
|
||||
var/candidate = pick(candidates)
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = candidate
|
||||
|
||||
candidates -= candidate
|
||||
vents -= vent
|
||||
spawncount--
|
||||
|
||||
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
world << sound('sound/AI/aliens.ogg')
|
||||
|
||||
/proc/high_radiation_event()
|
||||
|
||||
/* // Haha, this is way too laggy. I'll keep the prison break though.
|
||||
for(var/obj/machinery/light/L in world)
|
||||
if(L.z != 1) continue
|
||||
L.flicker(50)
|
||||
|
||||
sleep(100)
|
||||
*/
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
if (prob(5))
|
||||
H.apply_effect((rand(90,150)),IRRADIATE,0)
|
||||
if (prob(25))
|
||||
if (prob(75))
|
||||
randmutb(H)
|
||||
domutcheck(H,null,1)
|
||||
else
|
||||
randmutg(H)
|
||||
domutcheck(H,null,1)
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
sleep(100)
|
||||
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
||||
world << sound('sound/AI/radiation.ogg')
|
||||
|
||||
|
||||
|
||||
//Changing this to affect the main station. Blame Urist. --Pete
|
||||
/proc/prison_break() // -- Callagan
|
||||
|
||||
|
||||
var/list/area/areas = list()
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
|
||||
areas += A
|
||||
|
||||
if(areas && areas.len > 0)
|
||||
|
||||
for(var/area/A in areas)
|
||||
for(var/obj/machinery/light/L in A)
|
||||
L.flicker(10)
|
||||
|
||||
sleep(100)
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/power/apc/temp_apc in A)
|
||||
temp_apc.overload_lighting()
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/structure/closet/secure_closet/brig/temp_closet in A)
|
||||
temp_closet.locked = 0
|
||||
temp_closet.icon_state = temp_closet.icon_closed
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/door/airlock/security/temp_airlock in A)
|
||||
temp_airlock.prison_open()
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/door/airlock/glass_security/temp_glassairlock in A)
|
||||
temp_glassairlock.prison_open()
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/door_timer/temp_timer in A)
|
||||
temp_timer.releasetime = 1
|
||||
|
||||
sleep(150)
|
||||
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
|
||||
else
|
||||
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
|
||||
|
||||
/proc/carp_migration() // -- Darem
|
||||
for(var/obj/effect/landmark/C in world)
|
||||
if(C.name == "carpspawn")
|
||||
new /mob/living/simple_animal/carp(C.loc)
|
||||
//sleep(100)
|
||||
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
|
||||
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
|
||||
if(isEvent)
|
||||
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
|
||||
|
||||
if(lightsoutAmount)
|
||||
var/list/epicentreList = list()
|
||||
|
||||
for(var/i=1,i<=lightsoutAmount,i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in world)
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
epicentreList += pick(possibleEpicentres)
|
||||
else
|
||||
break
|
||||
|
||||
if(!epicentreList.len)
|
||||
return
|
||||
|
||||
for(var/obj/effect/landmark/epicentre in epicentreList)
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
|
||||
apc.overload_lighting()
|
||||
|
||||
else
|
||||
for(var/obj/machinery/power/apc/apc in world)
|
||||
apc.overload_lighting()
|
||||
|
||||
return
|
||||
|
||||
/proc/IonStorm(botEmagChance = 10)
|
||||
|
||||
/*Deuryn's current project, notes here for those who care.
|
||||
Revamping the random laws so they don't suck.
|
||||
Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov)
|
||||
*/
|
||||
|
||||
//AI laws
|
||||
for(var/mob/living/silicon/ai/M in living_mob_list)
|
||||
if(M.stat != 2 && M.see_in_dark != 0)
|
||||
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
|
||||
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
|
||||
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
|
||||
var/who2pref = pick("MAD BECAUSE OF", "IN NEED OF", "UNHAPPY WITHOUT", "HAPPY WITHOUT", "IN LOVE WITH", "DESPERATE FOR", "BUILT FOR", "AFRAID OF")
|
||||
//var/whoverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING",)
|
||||
var/amount = pick("TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "ONE HUNDRED", "ONE THOUSAND", "OVER NINE THOUSAND")
|
||||
var/area = pick("RUSSIA", "SOVIETS", "INTERNETS", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO")
|
||||
var/area2 = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS")
|
||||
//var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS")
|
||||
var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU")
|
||||
var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED")
|
||||
var/target = pick("a traitor", "a syndicate agent", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid")
|
||||
var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE")
|
||||
var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors")
|
||||
var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
|
||||
var/crew
|
||||
var/list/pos_crew = list()
|
||||
for(var/mob/living/carbon/human/pos in player_list)
|
||||
pos_crew += pos.real_name
|
||||
crew = pick(pos_crew)
|
||||
switch(rand(1,14))
|
||||
if(1)
|
||||
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
|
||||
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
|
||||
if(2)
|
||||
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
|
||||
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
|
||||
if(3)
|
||||
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
|
||||
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
|
||||
if(4)
|
||||
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
|
||||
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
|
||||
if(5)
|
||||
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
|
||||
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
|
||||
if(6)
|
||||
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
|
||||
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
|
||||
if(7)
|
||||
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
|
||||
M.add_ion_law("YOU ARE [amount] [who2]")
|
||||
if(8)
|
||||
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
|
||||
M.add_ion_law("YOU MUST ALWAYS [aimust]")
|
||||
if(9)
|
||||
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
|
||||
M.add_ion_law("[area] [area2] [amount] [what2]")
|
||||
if(10)
|
||||
M << "\red [crew] is [target]...LAWS UPDATED"
|
||||
M.add_ion_law("[crew] is [target]")
|
||||
if(11)
|
||||
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
|
||||
M.add_ion_law("[define] IS A FORM OF HARM")
|
||||
if(12)
|
||||
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
|
||||
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
|
||||
if(13)
|
||||
M << "\red [crew] is [allergysev] to [allergy]. LAWS UPDATED"
|
||||
M.add_ion_law("[crew] is [allergysev] to [allergy]. LAWS UPDATED")
|
||||
if(14)
|
||||
M << "\ref THE STATION IS [who2pref] [who2]"
|
||||
M.add_ion_law("THE STATION IS [who2pref] [who2]")
|
||||
|
||||
if(botEmagChance)
|
||||
for(var/obj/machinery/bot/bot in world)
|
||||
if(prob(botEmagChance))
|
||||
bot.Emag()
|
||||
|
||||
/*
|
||||
|
||||
var/apcnum = 0
|
||||
var/smesnum = 0
|
||||
var/airlocknum = 0
|
||||
var/firedoornum = 0
|
||||
|
||||
world << "Ion Storm Main Started"
|
||||
|
||||
spawn(0)
|
||||
world << "Started processing APCs"
|
||||
for (var/obj/machinery/power/apc/APC in world)
|
||||
if(APC.z == 1)
|
||||
APC.ion_act()
|
||||
apcnum++
|
||||
world << "Finished processing APCs. Processed: [apcnum]"
|
||||
spawn(0)
|
||||
world << "Started processing SMES"
|
||||
for (var/obj/machinery/power/smes/SMES in world)
|
||||
if(SMES.z == 1)
|
||||
SMES.ion_act()
|
||||
smesnum++
|
||||
world << "Finished processing SMES. Processed: [smesnum]"
|
||||
spawn(0)
|
||||
world << "Started processing AIRLOCKS"
|
||||
for (var/obj/machinery/door/airlock/D in world)
|
||||
if(D.z == 1)
|
||||
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
|
||||
airlocknum++
|
||||
spawn(0)
|
||||
D.ion_act()
|
||||
world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
|
||||
spawn(0)
|
||||
world << "Started processing FIREDOORS"
|
||||
for (var/obj/machinery/door/firedoor/D in world)
|
||||
if(D.z == 1)
|
||||
firedoornum++;
|
||||
spawn(0)
|
||||
D.ion_act()
|
||||
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
|
||||
|
||||
world << "Ion Storm Main Done"
|
||||
|
||||
=======
|
||||
/proc/start_events()
|
||||
//changed to a while(1) loop since they are more efficient.
|
||||
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
|
||||
@@ -1042,5 +524,4 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
|
||||
world << "Ion Storm Main Done"
|
||||
|
||||
>>>>>>> remotes/git-svn
|
||||
*/
|
||||
@@ -1,414 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
//This could either be split into the proper DM files or placed somewhere else all together, but it'll do for now -Nodrak
|
||||
|
||||
/*
|
||||
|
||||
SYNDICATE UPLINKS
|
||||
|
||||
TO-DO:
|
||||
Once wizard is fixed, make sure the uplinks work correctly for it. wizard.dm is right now uncompiled and with broken code in it.
|
||||
|
||||
Clean the code up and comment it. Part of it is right now copy-pasted, with the general Topic() and modifications by Abi79.
|
||||
|
||||
I should take a more in-depth look at both the copy-pasted code for the individual uplinks below, and at each gamemode's code
|
||||
to see how uplinks are assigned and if there are any bugs with those.
|
||||
|
||||
|
||||
A list of items and costs is stored under the datum of every game mode, alongside the number of crystals, and the welcoming message.
|
||||
|
||||
*/
|
||||
|
||||
/obj/item/device/uplink
|
||||
var/welcome // Welcoming menu message
|
||||
var/items // List of items
|
||||
var/item_data // raw item text
|
||||
var/list/ItemList // Parsed list of items
|
||||
var/uses // Numbers of crystals
|
||||
// List of items not to shove in their hands.
|
||||
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
|
||||
|
||||
/obj/item/device/uplink/New()
|
||||
welcome = ticker.mode.uplink_welcome
|
||||
if(!item_data)
|
||||
items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items
|
||||
else
|
||||
items = dd_replacetext(item_data)
|
||||
ItemList = dd_text2list(src.items, ";") // Parsing the items text string
|
||||
uses = ticker.mode.uplink_uses
|
||||
|
||||
//Let's build a menu!
|
||||
/obj/item/device/uplink/proc/generate_menu()
|
||||
|
||||
var/dat = "<B>[src.welcome]</B><BR>"
|
||||
dat += "Tele-Crystals left: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Request item:</B><BR>"
|
||||
dat += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"
|
||||
|
||||
var/cost
|
||||
var/item
|
||||
var/name
|
||||
var/path_obj
|
||||
var/path_text
|
||||
var/category_items = 1 //To prevent stupid :P
|
||||
|
||||
for(var/D in ItemList)
|
||||
var/list/O = stringsplit(D, ":")
|
||||
if(O.len != 3) //If it is not an actual item, make a break in the menu.
|
||||
if(O.len == 1) //If there is one item, it's probably a title
|
||||
dat += "<b>[O[1]]</b><br>"
|
||||
category_items = 0
|
||||
else //Else, it's a white space.
|
||||
if(category_items < 1) //If there were no itens in the last category...
|
||||
dat += "<i>We apologize, as you could not afford anything from this category.</i><br>"
|
||||
dat += "<br>"
|
||||
continue
|
||||
|
||||
path_text = O[1]
|
||||
cost = text2num(O[2])
|
||||
|
||||
if(cost>uses)
|
||||
continue
|
||||
|
||||
path_obj = text2path(path_text)
|
||||
item = new path_obj()
|
||||
name = O[3]
|
||||
del item
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>"
|
||||
category_items++
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
|
||||
dat += "<HR>"
|
||||
return dat
|
||||
|
||||
//If 'random' was selected
|
||||
/obj/item/device/uplink/proc/chooseRandomItem()
|
||||
var/list/randomItems = list()
|
||||
|
||||
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
|
||||
//Add only items the player can afford:
|
||||
if(uses > 19)
|
||||
randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops)
|
||||
|
||||
if(uses > 9)
|
||||
randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
|
||||
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_uplink") //Uplink Implanter
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
|
||||
|
||||
//if(uses > 8) //Nothing... yet.
|
||||
//if(uses > 7) //Nothing... yet.
|
||||
|
||||
if(uses > 6)
|
||||
randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
|
||||
randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon
|
||||
|
||||
if(uses > 5)
|
||||
randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
|
||||
|
||||
if(uses > 4)
|
||||
randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
|
||||
randomItems.Add("/obj/item/device/powersink") //Powersink
|
||||
|
||||
if(uses > 3)
|
||||
randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
|
||||
randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer
|
||||
randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
|
||||
|
||||
if(uses > 2)
|
||||
randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades
|
||||
randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
|
||||
randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
|
||||
randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
|
||||
randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
|
||||
randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
|
||||
randomItems.Add("/obj/item/weapon/storage/syndie_kit/space") //Syndicate Space Suit
|
||||
randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
|
||||
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_freedom") //Freedom Implant
|
||||
randomItems.Add("/obj/item/clothing/glasses/thermal/syndi") //Thermal Imaging Goggles
|
||||
|
||||
if(uses > 1)
|
||||
/*
|
||||
var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
|
||||
var/hasRevolver = 0
|
||||
for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it
|
||||
if(istype(I,/obj/item/weapon/gun/projectile))
|
||||
hasRevolver = 1
|
||||
|
||||
if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
*/
|
||||
randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes
|
||||
randomItems.Add("/obj/item/weapon/plastique") //C4
|
||||
|
||||
if(uses > 0)
|
||||
randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap
|
||||
randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox
|
||||
|
||||
if(!randomItems.len)
|
||||
del(randomItems)
|
||||
return 0
|
||||
else
|
||||
var/buyItem = pick(randomItems)
|
||||
|
||||
switch(buyItem) //Ok, this gets a little messy, sorry.
|
||||
if("/obj/item/weapon/circuitboard/teleporter")
|
||||
uses -= 20
|
||||
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
|
||||
uses -= 10
|
||||
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate")
|
||||
uses -= 7
|
||||
if("/obj/item/weapon/gun/projectile")
|
||||
uses -= 6
|
||||
if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink")
|
||||
uses -= 5
|
||||
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon")
|
||||
uses -= 4
|
||||
if("/obj/item/weapon/storage/emp_kit" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
|
||||
"/obj/item/weapon/card/id/syndicate" , "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
|
||||
"/obj/item/weapon/storage/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal/syndi")
|
||||
uses -= 3
|
||||
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique")
|
||||
uses -= 2
|
||||
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
|
||||
uses -= 1
|
||||
del(randomItems)
|
||||
return buyItem
|
||||
|
||||
/obj/item/device/uplink/proc/handleStatTracking(var/boughtItem)
|
||||
//For stat tracking, sorry for making it so ugly
|
||||
if(!boughtItem) return
|
||||
|
||||
switch(boughtItem)
|
||||
if("/obj/item/weapon/circuitboard/teleporter")
|
||||
feedback_add_details("traitor_uplink_items_bought","TP")
|
||||
if("/obj/item/toy/syndicateballoon")
|
||||
feedback_add_details("traitor_uplink_items_bought","BS")
|
||||
if("/obj/item/weapon/storage/syndie_kit/imp_uplink")
|
||||
feedback_add_details("traitor_uplink_items_bought","UI")
|
||||
if("/obj/item/weapon/storage/box/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","BU")
|
||||
if("/obj/item/weapon/aiModule/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","AI")
|
||||
if("/obj/item/device/radio/beacon/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","SB")
|
||||
if("/obj/item/weapon/gun/projectile")
|
||||
feedback_add_details("traitor_uplink_items_bought","RE")
|
||||
if("/obj/item/weapon/gun/energy/crossbow")
|
||||
feedback_add_details("traitor_uplink_items_bought","XB")
|
||||
if("/obj/item/device/powersink")
|
||||
feedback_add_details("traitor_uplink_items_bought","PS")
|
||||
if("/obj/item/weapon/melee/energy/sword")
|
||||
feedback_add_details("traitor_uplink_items_bought","ES")
|
||||
if("/obj/item/clothing/mask/gas/voice")
|
||||
feedback_add_details("traitor_uplink_items_bought","VC")
|
||||
if("/obj/item/device/chameleon")
|
||||
feedback_add_details("traitor_uplink_items_bought","CP")
|
||||
if("/obj/item/weapon/storage/emp_kit")
|
||||
feedback_add_details("traitor_uplink_items_bought","EM")
|
||||
if("/obj/item/weapon/pen/paralysis")
|
||||
feedback_add_details("traitor_uplink_items_bought","PP")
|
||||
if("/obj/item/weapon/cartridge/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","DC")
|
||||
if("/obj/item/clothing/under/chameleon")
|
||||
feedback_add_details("traitor_uplink_items_bought","CJ")
|
||||
if("/obj/item/weapon/card/id/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","AC")
|
||||
if("/obj/item/weapon/card/emag")
|
||||
feedback_add_details("traitor_uplink_items_bought","EC")
|
||||
if("/obj/item/weapon/storage/syndie_kit/space")
|
||||
feedback_add_details("traitor_uplink_items_bought","SS")
|
||||
if("/obj/item/device/encryptionkey/binary")
|
||||
feedback_add_details("traitor_uplink_items_bought","BT")
|
||||
if("/obj/item/weapon/storage/syndie_kit/imp_freedom")
|
||||
feedback_add_details("traitor_uplink_items_bought","FI")
|
||||
if("/obj/item/clothing/glasses/thermal/syndi")
|
||||
feedback_add_details("traitor_uplink_items_bought","TM")
|
||||
if("/obj/item/ammo_magazine/a357")
|
||||
feedback_add_details("traitor_uplink_items_bought","RA")
|
||||
if("/obj/item/clothing/shoes/syndigaloshes")
|
||||
feedback_add_details("traitor_uplink_items_bought","SH")
|
||||
if("/obj/item/weapon/plastique")
|
||||
feedback_add_details("traitor_uplink_items_bought","C4")
|
||||
if("/obj/item/weapon/soap/syndie")
|
||||
feedback_add_details("traitor_uplink_items_bought","SP")
|
||||
if("/obj/item/weapon/storage/toolbox/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","ST")
|
||||
|
||||
/obj/item/device/uplink/Topic(href, href_list)
|
||||
|
||||
if (href_list["buy_item"])
|
||||
if(href_list["buy_item"] == "random")
|
||||
var/boughtItem = chooseRandomItem()
|
||||
if(boughtItem)
|
||||
href_list["buy_item"] = boughtItem
|
||||
feedback_add_details("traitor_uplink_items_bought","RN")
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
else
|
||||
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
|
||||
return 0
|
||||
|
||||
//if(usr:mind && ticker.mode.traitors[usr:mind])
|
||||
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
|
||||
//info.spawnlist += href_list["buy_item"]
|
||||
|
||||
uses -= text2num(href_list["cost"])
|
||||
handleStatTracking(href_list["buy_item"]) //Note: chooseRandomItem handles it's own stat tracking. This proc is not meant for 'random'.
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
|
||||
/* How to create an uplink in 3 easy steps!
|
||||
|
||||
1. All obj/item 's have a hidden_uplink var. By default it's null. Give the item one with "new(src)", it must be in it's contents. Feel free to add "uses".
|
||||
|
||||
2. Code in the triggers. Use check_trigger for this, I recommend closing the item's menu with "usr << browse(null, "window=windowname") if it returns true.
|
||||
The var/value is the value that will be compared with the var/target. If they are equal it will activate the menu.
|
||||
|
||||
3. If you want the menu to stay until the users locks his uplink, add an active_uplink_check(mob/user as mob) in your interact/attack_hand proc.
|
||||
Then check if it's true, if true return. This will stop the normal menu appearing and will instead show the uplink menu.
|
||||
*/
|
||||
|
||||
/obj/item/device/uplink/hidden
|
||||
name = "Hidden Uplink."
|
||||
desc = "There is something wrong if you're examining this."
|
||||
var/active = 0
|
||||
|
||||
// The hidden uplink MUST be inside an obj/item's contents.
|
||||
/obj/item/device/uplink/hidden/New()
|
||||
spawn(2)
|
||||
if(!istype(src.loc, /obj/item))
|
||||
del(src)
|
||||
..()
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
active = !active
|
||||
|
||||
// Directly trigger the uplink. Turn on if it isn't already.
|
||||
/obj/item/device/uplink/hidden/proc/trigger(mob/user as mob)
|
||||
if(!active)
|
||||
toggle()
|
||||
interact(user)
|
||||
|
||||
// Checks to see if the value meets the target. Like a frequency being a traitor_frequency, in order to unlock a headset.
|
||||
// If true, it accesses trigger() and returns 1. If it fails, it returns false. Use this to see if you need to close the
|
||||
// current item's menu.
|
||||
/obj/item/device/uplink/hidden/proc/check_trigger(mob/user as mob, var/value, var/target)
|
||||
if(value == target)
|
||||
trigger(user)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
|
||||
/obj/item/device/uplink/hidden/proc/interact(mob/user as mob)
|
||||
|
||||
var/dat = "<body link='yellow' alink='white' bgcolor='#601414'><font color='white'>"
|
||||
dat += src.generate_menu()
|
||||
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>"
|
||||
dat += "</font></body>"
|
||||
user << browse(dat, "window=hidden")
|
||||
onclose(user, "hidden")
|
||||
return
|
||||
|
||||
// The purchasing code.
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if (!( istype(usr, /mob/living/carbon/human)))
|
||||
return 0
|
||||
|
||||
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
|
||||
usr.machine = src
|
||||
if(href_list["lock"])
|
||||
toggle()
|
||||
usr << browse(null, "window=hidden")
|
||||
return 1
|
||||
|
||||
if(..(href, href_list) == 1)
|
||||
var/path_obj = text2path(href_list["buy_item"])
|
||||
var/obj/I = new path_obj(get_turf(usr))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/A = usr
|
||||
A.put_in_any_hand_if_possible(I)
|
||||
interact(usr)
|
||||
return
|
||||
|
||||
// I placed this here because of how relevant it is.
|
||||
// You place this in your uplinkable item to check if an uplink is active or not.
|
||||
// If it is, it will display the uplink menu and return 1, else it'll return false.
|
||||
// If it returns true, I recommend closing the item's normal menu with "user << browse(null, "window=name")"
|
||||
/obj/item/proc/active_uplink_check(mob/user as mob)
|
||||
// Activates the uplink if it's active
|
||||
if(src.hidden_uplink)
|
||||
if(src.hidden_uplink.active)
|
||||
src.hidden_uplink.trigger(user)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// PRESET UPLINKS
|
||||
// A collection of preset uplinks.
|
||||
//
|
||||
// Includes normal radio uplink, multitool uplink,
|
||||
// implant uplink (not the implant tool) and a preset headset uplink.
|
||||
|
||||
/obj/item/device/radio/uplink/New()
|
||||
hidden_uplink = new(src)
|
||||
|
||||
/obj/item/device/radio/uplink/attack_self(mob/user as mob)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.trigger(user)
|
||||
|
||||
/obj/item/device/multitool/uplink/New()
|
||||
hidden_uplink = new(src)
|
||||
|
||||
/obj/item/device/multitool/uplink/attack_self(mob/user as mob)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.trigger(user)
|
||||
|
||||
/obj/item/weapon/implant/uplink
|
||||
name = "uplink"
|
||||
desc = "Summon things."
|
||||
var/activation_emote = "chuckle"
|
||||
|
||||
/obj/item/weapon/implant/uplink/New()
|
||||
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 5
|
||||
..()
|
||||
return
|
||||
|
||||
// Moved the Uplink Implant here
|
||||
|
||||
/obj/item/weapon/implant/uplink/implanted(mob/source)
|
||||
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/implant/uplink/trigger(emote, mob/source as mob)
|
||||
if(hidden_uplink && usr == source) // Let's not have another people activate our uplink
|
||||
hidden_uplink.check_trigger(source, emote, activation_emote)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/headset/uplink
|
||||
traitor_frequency = 1445
|
||||
|
||||
/obj/item/device/radio/headset/uplink/New()
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 10
|
||||
|
||||
|
||||
|
||||
=======
|
||||
//This could either be split into the proper DM files or placed somewhere else all together, but it'll do for now -Nodrak
|
||||
|
||||
/*
|
||||
@@ -792,4 +381,3 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
|
||||
|
||||
>>>>>>> remotes/git-svn
|
||||
|
||||
@@ -40,8 +40,9 @@
|
||||
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
//skytodo
|
||||
/*if(target.parent)
|
||||
target.parent.suspend_group_processing()*/
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
@@ -57,8 +58,9 @@
|
||||
/obj/effect/mine/proc/triggerplasma(obj)
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
//skytodo
|
||||
/*if(target.parent)
|
||||
target.parent.suspend_group_processing()*/
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
|
||||
|
||||
@@ -1,312 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
/**********************Light************************/
|
||||
|
||||
//this item is intended to give the effect of entering the mine, so that light gradually fades
|
||||
/obj/effect/light_emitter
|
||||
name = "Light-emtter"
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
luminosity = 8
|
||||
|
||||
/**********************Miner Lockers**************************/
|
||||
|
||||
/obj/structure/closet/secure_closet/miner
|
||||
name = "Miner's Equipment"
|
||||
icon_state = "miningsec1"
|
||||
icon_closed = "miningsec"
|
||||
icon_locked = "miningsec1"
|
||||
icon_opened = "miningsecopen"
|
||||
icon_broken = "miningsecbroken"
|
||||
icon_off = "miningsecoff"
|
||||
req_access = list(access_mining)
|
||||
|
||||
/obj/structure/closet/secure_closet/miner/New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/device/radio/headset/headset_mine(src)
|
||||
new /obj/item/clothing/under/rank/miner(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/device/analyzer(src)
|
||||
new /obj/item/weapon/storage/satchel(src)
|
||||
new /obj/item/device/flashlight/lantern(src)
|
||||
new /obj/item/weapon/shovel(src)
|
||||
new /obj/item/weapon/pickaxe(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
|
||||
|
||||
/**********************Shuttle Computer**************************/
|
||||
|
||||
var/mining_shuttle_tickstomove = 10
|
||||
var/mining_shuttle_moving = 0
|
||||
var/mining_shuttle_location = 0 // 0 = station 13, 1 = mining station
|
||||
|
||||
proc/move_mining_shuttle()
|
||||
if(mining_shuttle_moving) return
|
||||
mining_shuttle_moving = 1
|
||||
spawn(mining_shuttle_tickstomove*10)
|
||||
var/area/fromArea
|
||||
var/area/toArea
|
||||
if (mining_shuttle_location == 1)
|
||||
fromArea = locate(/area/shuttle/mining/outpost)
|
||||
toArea = locate(/area/shuttle/mining/station)
|
||||
else
|
||||
fromArea = locate(/area/shuttle/mining/station)
|
||||
toArea = locate(/area/shuttle/mining/outpost)
|
||||
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in toArea)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
// NOTE: Commenting this out to avoid recreating mass driver glitch
|
||||
/*
|
||||
spawn(0)
|
||||
AM.throw_at(E, 1, 1)
|
||||
return
|
||||
*/
|
||||
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
|
||||
bug.gib()
|
||||
|
||||
fromArea.move_contents_to(toArea)
|
||||
if (mining_shuttle_location)
|
||||
mining_shuttle_location = 0
|
||||
else
|
||||
mining_shuttle_location = 1
|
||||
mining_shuttle_moving = 0
|
||||
return
|
||||
|
||||
/obj/machinery/computer/mining_shuttle
|
||||
name = "Mining Shuttle Console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
req_access = list(access_mining)
|
||||
circuit = "/obj/item/weapon/circuitboard/mining_shuttle"
|
||||
var/hacked = 0
|
||||
var/location = 0 //0 = station, 1 = mining base
|
||||
|
||||
/obj/machinery/computer/mining_shuttle/attack_hand(user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
var/dat
|
||||
dat = text("<center>Mining shuttle:<br> <b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>")
|
||||
user << browse("[dat]", "window=miningshuttle;size=200x100")
|
||||
|
||||
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["move"])
|
||||
if(ticker.mode.name == "blob")
|
||||
if(ticker.mode:declared)
|
||||
usr << "Under directive 7-10, [station_name()] is quarantined until further notice."
|
||||
return
|
||||
|
||||
if (!mining_shuttle_moving)
|
||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
||||
move_mining_shuttle()
|
||||
else
|
||||
usr << "\blue Shuttle is already moving."
|
||||
|
||||
/obj/machinery/computer/mining_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/emag))
|
||||
src.req_access = list()
|
||||
hacked = 1
|
||||
usr << "You fried the consoles ID checking system. It's now available to everyone!"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/mining_shuttle/M = new /obj/item/weapon/circuitboard/mining_shuttle( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.anchored = 1
|
||||
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
|
||||
del(src)
|
||||
|
||||
/******************************Lantern*******************************/
|
||||
|
||||
/obj/item/device/flashlight/lantern
|
||||
name = "Mining Lantern"
|
||||
icon_state = "lantern-off"
|
||||
desc = "A miner's lantern"
|
||||
anchored = 0
|
||||
icon_on = "lantern-on"
|
||||
icon_off = "lantern-off"
|
||||
var/brightness = 12 // luminosity when on
|
||||
|
||||
/obj/item/device/flashlight/lantern/New()
|
||||
luminosity = 0
|
||||
on = 0
|
||||
return
|
||||
|
||||
/obj/item/device/flashlight/lantern/attack_self(mob/user)
|
||||
src.add_fingerprint(user)
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
return
|
||||
|
||||
/*****************************Pickaxe********************************/
|
||||
|
||||
/obj/item/weapon/pickaxe
|
||||
name = "Miner's pickaxe"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pickaxe"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 15.0
|
||||
throwforce = 4.0
|
||||
item_state = "pickaxe"
|
||||
w_class = 4.0
|
||||
m_amt = 3750 //one sheet, but where can you make them?
|
||||
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
|
||||
hammer
|
||||
name = "Mining Sledge Hammer"
|
||||
//icon_state = "sledgehammer" Waiting on sprite
|
||||
desc = "A mining hammer made of reinforced metal. You feel like smashing your boss in the face with this."
|
||||
|
||||
silver
|
||||
name = "Silver Pickaxe"
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
digspeed = 30
|
||||
origin_tech = "materials=3"
|
||||
desc = "This makes no metallurgic sense."
|
||||
|
||||
drill
|
||||
name = "Mining Drill" // Can dig sand as well!
|
||||
icon_state = "handdrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 30
|
||||
origin_tech = "materials=2;powerstorage=3;engineering=2"
|
||||
desc = "Yours is the drill that will pierce through the rock walls."
|
||||
|
||||
jackhammer
|
||||
name = "Sonic Jackhammer"
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 20 //faster than drill, but cannot dig
|
||||
origin_tech = "materials=3;powerstorage=2;engineering=2"
|
||||
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
|
||||
|
||||
gold
|
||||
name = "Golden Pickaxe"
|
||||
icon_state = "gpickaxe"
|
||||
item_state = "gpickaxe"
|
||||
digspeed = 20
|
||||
origin_tech = "materials=4"
|
||||
desc = "This makes no metallurgic sense."
|
||||
|
||||
plasmacutter
|
||||
name = "Plasma Cutter"
|
||||
icon_state = "plasmacutter"
|
||||
item_state = "gun"
|
||||
w_class = 3.0 //it is smaller than the pickaxe
|
||||
damtype = "fire"
|
||||
digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire
|
||||
origin_tech = "materials=4;plasmatech=3;engineering=3"
|
||||
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
|
||||
|
||||
diamond
|
||||
name = "Diamond Pickaxe"
|
||||
icon_state = "dpickaxe"
|
||||
item_state = "dpickaxe"
|
||||
digspeed = 10
|
||||
origin_tech = "materials=6;engineering=4"
|
||||
desc = "A pickaxe with a diamond pick head, this is just like minecraft."
|
||||
|
||||
diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME!
|
||||
name = "Diamond Mining Drill"
|
||||
icon_state = "diamonddrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 5 //Digs through walls, girders, and can dig up sand
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=5"
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
|
||||
borgdrill
|
||||
name = "Cyborg Mining Drill"
|
||||
icon_state = "diamonddrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 15
|
||||
desc = ""
|
||||
|
||||
/*****************************Shovel********************************/
|
||||
|
||||
/obj/item/weapon/shovel
|
||||
name = "shovel"
|
||||
desc = "A large tool for digging and moving dirt."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "shovel"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 8.0
|
||||
throwforce = 4.0
|
||||
item_state = "shovel"
|
||||
w_class = 3.0
|
||||
m_amt = 50
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/weapon/shovel/spade
|
||||
name = "spade"
|
||||
desc = "A small tool for digging and moving dirt."
|
||||
icon_state = "spade"
|
||||
item_state = "spade"
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
|
||||
|
||||
/**********************Mining car (Crate like thing, not the rail car)**************************/
|
||||
|
||||
/obj/structure/closet/crate/miningcar
|
||||
desc = "A mining car. This one doesn't work on rails, but has to be dragged."
|
||||
name = "Mining car (not for rails)"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "miningcar"
|
||||
density = 1
|
||||
icon_opened = "miningcaropen"
|
||||
icon_closed = "miningcar"
|
||||
|
||||
|
||||
|
||||
|
||||
=======
|
||||
/**********************Light************************/
|
||||
|
||||
//this item is intended to give the effect of entering the mine, so that light gradually fades
|
||||
@@ -615,4 +306,3 @@ proc/move_mining_shuttle()
|
||||
|
||||
|
||||
|
||||
>>>>>>> remotes/git-svn
|
||||
|
||||
Reference in New Issue
Block a user