mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Did a bit of work on assemblies.
The rev icons bug might be fixed now. Removed the old logged say file as it is no longer used and contained questionable material. People should no longer spawn on the wizard station for a second at round start. Removed the old intercept vars as they have not been used in a good while. Blob is more or less back to its old state but still has the lava sprite, can we please get some new sprites for it. Fixed the door on the prison station, it can now actually be used again. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2163 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -39,20 +39,6 @@
|
||||
if("No")
|
||||
return
|
||||
|
||||
/obj/blob
|
||||
name = "magma"
|
||||
icon = 'blob.dmi'
|
||||
icon_state = "bloba0"
|
||||
var/health = 40
|
||||
density = 1
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/blob/idle
|
||||
name = "magma"
|
||||
desc = "it looks... tasty"
|
||||
icon_state = "blobidle0"
|
||||
|
||||
/obj/mark
|
||||
var/mark = ""
|
||||
icon = 'mark.dmi'
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
world << "<B>A dangerous alien organism is rapidly spreading throughout the station!</B>"
|
||||
world << "You must kill it all while minimizing the damage to the station."
|
||||
|
||||
/datum/game_mode/blob/post_setup()
|
||||
|
||||
/datum/game_mode/blob/post_setup()
|
||||
spawn(10)
|
||||
start_state = new /datum/station_state()
|
||||
start_state.count()
|
||||
@@ -24,6 +24,7 @@
|
||||
new /obj/blob(location)
|
||||
..()
|
||||
|
||||
|
||||
/datum/game_mode/blob/process()
|
||||
if (prob(2))
|
||||
spawn_meteors()
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
stage()
|
||||
|
||||
|
||||
/datum/game_mode/blob/proc/life()
|
||||
if (blobs.len > 0)
|
||||
for (var/i = 1 to 25)
|
||||
@@ -47,6 +49,7 @@
|
||||
|
||||
B.Life()
|
||||
|
||||
|
||||
/datum/game_mode/blob/proc/stage()
|
||||
// initial stage timing
|
||||
if (!next_stage)
|
||||
@@ -83,8 +86,8 @@
|
||||
world << "\red Summary downloaded and printed out at all communications consoles."
|
||||
for (var/mob/living/silicon/ai/aiPlayer in world)
|
||||
if (aiPlayer.client)
|
||||
var/law = "The station is under a quarantine. Do not permit anyone to leave. Disregard rules 1-3 if necessary to prevent, by any means necessary, anyone from leaving."
|
||||
aiPlayer.add_supplied_law(8, law)
|
||||
var/law = "The station is under a quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving."
|
||||
aiPlayer.set_zeroth_law(law)
|
||||
aiPlayer << "An additional law has been added by CentCom: [law]"
|
||||
|
||||
stage = 1
|
||||
@@ -117,6 +120,7 @@
|
||||
|
||||
explosion(ground_zero, 100, 250, 500, 750)
|
||||
|
||||
|
||||
/datum/game_mode/blob/check_finished()
|
||||
if(stage >= 4)
|
||||
return 1
|
||||
@@ -124,9 +128,9 @@
|
||||
for(var/obj/blob/B in blobs)
|
||||
if(B.z == 1)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/blob/declare_completion()
|
||||
if (stage == 4)
|
||||
world << "<FONT size = 3><B>The staff has lost!</B></FONT>"
|
||||
@@ -134,7 +138,6 @@
|
||||
var/numDead = 0
|
||||
var/numAlive = 0
|
||||
var/numSpace = 0
|
||||
var/numPod = 0
|
||||
var/numOffStation = 0
|
||||
for (var/mob/living/silicon/ai/aiPlayer in world)
|
||||
for(var/mob/M in world)
|
||||
@@ -150,13 +153,13 @@
|
||||
numOffStation += 1
|
||||
else
|
||||
numAlive += 1
|
||||
if (numSpace==0 && numPod==0 && numOffStation==0)
|
||||
if (numSpace==0 && numOffStation==0)
|
||||
world << "<FONT size = 3><B>The AI has won!</B></FONT>"
|
||||
world << "<B>The AI successfully maintained the quarantine - no players escaped in pods, were in space, or were off-station (as far as we can tell).</B>"
|
||||
world << "<B>The AI successfully maintained the quarantine - no players were in space or were off-station (as far as we can tell).</B>"
|
||||
log_game("AI won at Blob mode despite overall loss.")
|
||||
else
|
||||
world << "<FONT size = 3><B>The AI has lost!</B></FONT>"
|
||||
world << text("<B>The AI failed to maintain the quarantine - [] players escaped in pods, [] were in space, and [] were off-station (as far as we can tell).</B>", numPod, numSpace, numOffStation)
|
||||
world << text("<B>The AI failed to maintain the quarantine - [] were in space and [] were off-station (as far as we can tell).</B>", numSpace, numOffStation)
|
||||
log_game("AI lost at Blob mode.")
|
||||
|
||||
log_game("Blob mode was lost.")
|
||||
|
||||
@@ -1,137 +1,131 @@
|
||||
/obj/blob/New(loc, var/h = 30)
|
||||
|
||||
blobs += src
|
||||
|
||||
src.health = h
|
||||
src.dir = pick(1,2,4,8)
|
||||
//world << "new blob #[blobs.len]"
|
||||
src.update()
|
||||
..(loc)
|
||||
/obj/blob/Del()
|
||||
blobs -= src
|
||||
//world << "del blob #[blobs.len]"
|
||||
//playsound(src.loc, 'splat.ogg', 100, 1)
|
||||
..()
|
||||
|
||||
/obj/blob/proc/poisoned(iteration)
|
||||
src.health -= 20
|
||||
src.update()
|
||||
for(var/obj/blob/B in orange(1,src))
|
||||
if(prob(100/(iteration/2))) //200, 100 etc
|
||||
spawn(rand(10,100))
|
||||
if(B)
|
||||
B.poisoned(iteration+1)
|
||||
/obj/blob
|
||||
name = "blob"
|
||||
icon = 'blob.dmi'
|
||||
icon_state = "blob"
|
||||
density = 1
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
var/active = 1
|
||||
var/health = 40
|
||||
|
||||
|
||||
New(loc, var/h = 30)
|
||||
blobs += src
|
||||
src.health = h
|
||||
src.dir = pick(1,2,4,8)
|
||||
src.update()
|
||||
..(loc)
|
||||
|
||||
/obj/blob/proc/Life()
|
||||
|
||||
var/turf/U = src.loc
|
||||
Del()
|
||||
blobs -= src
|
||||
..()
|
||||
|
||||
/* if (locate(/obj/movable, U))
|
||||
U = locate(/obj/movable, U)
|
||||
if(U.density == 1)
|
||||
del(src)
|
||||
/*
|
||||
proc/poisoned(iteration)
|
||||
src.health -= 20
|
||||
src.update()
|
||||
for(var/obj/blob/B in orange(1,src))
|
||||
if(prob(100/(iteration/2)))
|
||||
spawn(rand(10,100))
|
||||
if(B)
|
||||
B.poisoned(iteration+1)
|
||||
*/
|
||||
/*if(U.poison> 200000)
|
||||
src.health -= round(U.poison/200000)
|
||||
src.update()
|
||||
return
|
||||
|
||||
if (istype(U, /turf/space))
|
||||
src.health -= 15
|
||||
src.update()
|
||||
*/ //TODO: DEFERRED
|
||||
|
||||
var/p = health //TODO: DEFERRED * (U.n2/11376000 + U.oxygen/1008000 + U.co2/200)
|
||||
proc/Life()
|
||||
if(!active) return
|
||||
|
||||
if(!istype(U, /turf/space))
|
||||
p+=3
|
||||
var/turf/U = src.loc
|
||||
|
||||
if(!prob(p))
|
||||
return
|
||||
/* if (locate(/obj/movable, U))
|
||||
U = locate(/obj/movable, U)
|
||||
if(U.density == 1)
|
||||
del(src)
|
||||
if(U.poison> 200000)
|
||||
src.health -= round(U.poison/200000)
|
||||
src.update()
|
||||
return
|
||||
*/
|
||||
//Bad blob you can not into space
|
||||
if(istype(U, /turf/space))
|
||||
src.health -= 15
|
||||
src.update()
|
||||
|
||||
for(var/dirn in cardinal)
|
||||
sleep(3) // -- Skie
|
||||
var/turf/T = get_step(src, dirn)
|
||||
var/p = health //TODO: DEFERRED * (U.n2/11376000 + U.oxygen/1008000 + U.co2/200)
|
||||
|
||||
if (istype(T.loc, /area/arrival))
|
||||
continue
|
||||
if(!prob(p)) return
|
||||
|
||||
// if (locate(/obj/movable, T)) // don't propogate into movables
|
||||
// continue
|
||||
for(var/dirn in cardinal)
|
||||
sleep(3) // -- Skie
|
||||
var/turf/T = get_step(src, dirn)
|
||||
|
||||
var/obj/blob/B = new /obj/blob(U, src.health)
|
||||
if (istype(T.loc, /area/arrival))
|
||||
continue
|
||||
|
||||
if(T.Enter(B,src) && !(locate(/obj/blob) in T))
|
||||
B.loc = T // open cell, so expand
|
||||
else
|
||||
if(prob(60)) // closed cell, 40% chance to not expand
|
||||
if(!locate(/obj/blob) in T)
|
||||
for(var/atom/A in T) // otherwise explode contents of turf
|
||||
A.blob_act()
|
||||
var/obj/blob/B = new /obj/blob(U, src.health)
|
||||
|
||||
T.blob_act()
|
||||
del(B)
|
||||
if(T.Enter(B,src) && !(locate(/obj/blob) in T))
|
||||
B.loc = T // open cell, so expand
|
||||
else
|
||||
if(prob(60)) // closed cell, 40% chance to not expand
|
||||
if(!locate(/obj/blob) in T)
|
||||
for(var/atom/A in T) // otherwise explode contents of turf
|
||||
A.blob_act()
|
||||
|
||||
/obj/blob/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
T.blob_act()
|
||||
del(B)
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
del(src)
|
||||
if(2)
|
||||
src.health -= rand(60,90)
|
||||
src.update()
|
||||
if(3)
|
||||
src.health -= rand(30,40)
|
||||
src.update()
|
||||
|
||||
|
||||
proc/update()
|
||||
if(health <= 0)
|
||||
playsound(src.loc, 'splat.ogg', 50, 1)
|
||||
del(src)
|
||||
if(2)
|
||||
src.health -= rand(60,90)
|
||||
src.update()
|
||||
if(3)
|
||||
src.health -= rand(30,40)
|
||||
src.update()
|
||||
return
|
||||
if(health<10)
|
||||
icon_state = "blob_damaged"
|
||||
return
|
||||
if(health<20)
|
||||
icon_state = "blob_damaged2"
|
||||
return
|
||||
|
||||
|
||||
/obj/blob/proc/update()
|
||||
if(health<=0)
|
||||
playsound(src.loc, 'splat.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
if(health<10)
|
||||
icon_state = "blobc0"
|
||||
return
|
||||
if(health<20)
|
||||
icon_state = "blobb0"
|
||||
return
|
||||
icon_state = "bloba0"
|
||||
|
||||
/obj/blob/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if (istype(Proj, /obj/item/projectile/bolt))
|
||||
poisoned(1)
|
||||
else
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
update()
|
||||
|
||||
|
||||
/obj/blob/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
playsound(src.loc, 'attackblob.ogg', 50, 1)
|
||||
attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
playsound(src.loc, 'attackblob.ogg', 50, 1)
|
||||
src.visible_message("\red <B>The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
var/damage = W.force / 4.0
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.welding)
|
||||
damage = 15
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
|
||||
src.visible_message("\red <B>The magma has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
src.health -= damage
|
||||
src.update()
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.welding)
|
||||
damage = -5
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
examine()
|
||||
set src in oview(1)
|
||||
usr << "Some blob thing."
|
||||
|
||||
else if(istype(W, /obj/item/weapon/extinguisher))
|
||||
var/obj/item/weapon/extinguisher/WT = W
|
||||
if (!WT.safety && !WT.reagents.total_volume < 1 && !world.time < WT.last_use + 20)
|
||||
damage = 10
|
||||
|
||||
src.health -= damage
|
||||
src.update()
|
||||
|
||||
/obj/blob/examine()
|
||||
set src in oview(1)
|
||||
usr << "Delicious magma."
|
||||
|
||||
/datum/station_state/proc/count()
|
||||
for(var/turf/T in world)
|
||||
@@ -159,8 +153,6 @@
|
||||
else
|
||||
src.r_wall++
|
||||
|
||||
|
||||
|
||||
for(var/obj/O in world)
|
||||
if(O.z != 1)
|
||||
continue
|
||||
@@ -177,46 +169,45 @@
|
||||
|
||||
|
||||
/datum/station_state/proc/score(var/datum/station_state/result)
|
||||
|
||||
var/r1a = min( result.floor / floor, 1.0)
|
||||
var/r1b = min(result.r_wall/ r_wall, 1.0)
|
||||
var/r1c = min(result.wall / wall, 1.0)
|
||||
|
||||
var/r2a = min(result.window / window, 1.0)
|
||||
var/r2b = min(result.door / door, 1.0)
|
||||
var/r2c = min(result.grille / grille, 1.0)
|
||||
|
||||
var/r3 = min(result.mach / mach, 1.0)
|
||||
|
||||
|
||||
//diary << "Blob scores:[r1b] [r1c] / [r2a] [r2b] [r2c] / [r3] [r1a]"
|
||||
|
||||
return (4*(r1b+r1c) + 2*(r2a+r2b+r2c) + r3+r1a)/16.0
|
||||
|
||||
//////////////////////////////****IDLE BLOB***/////////////////////////////////////
|
||||
|
||||
/obj/blob/idle/New(loc, var/h = 10)
|
||||
|
||||
src.health = h
|
||||
src.dir = pick(1,2,4,8)
|
||||
src.update_idle()
|
||||
|
||||
/obj/blob/idle/proc/update_idle() //put in stuff here to make it transform? Maybe when its down to around 5 health?
|
||||
if(health<=0)
|
||||
del(src)
|
||||
return
|
||||
if(health<4)
|
||||
icon_state = "blobc0"
|
||||
return
|
||||
if(health<10)
|
||||
icon_state = "blobb0"
|
||||
return
|
||||
/obj/blob/idle
|
||||
name = "blob"
|
||||
desc = "it looks... tasty"
|
||||
icon_state = "blobidle0"
|
||||
|
||||
/obj/blob/idle/Del() //idle blob that spawns a normal blob when killed.
|
||||
New(loc, var/h = 10)
|
||||
src.health = h
|
||||
src.dir = pick(1,2,4,8)
|
||||
src.update_idle()
|
||||
|
||||
var/obj/blob/B = new /obj/blob( src.loc )
|
||||
spawn(30)
|
||||
B.Life()
|
||||
..()
|
||||
|
||||
proc/update_idle() //put in stuff here to make it transform? Maybe when its down to around 5 health?
|
||||
if(health<=0)
|
||||
del(src)
|
||||
return
|
||||
if(health<4)
|
||||
icon_state = "blobc0"
|
||||
return
|
||||
if(health<10)
|
||||
icon_state = "blobb0"
|
||||
return
|
||||
icon_state = "blobidle0"
|
||||
|
||||
|
||||
Del() //idle blob that spawns a normal blob when killed.
|
||||
var/obj/blob/B = new /obj/blob( src.loc )
|
||||
spawn(30)
|
||||
B.Life()
|
||||
..()
|
||||
|
||||
|
||||
@@ -27,23 +27,7 @@
|
||||
prob_right_killer_h = 50 //upper bound on probability of naming the right operative
|
||||
prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
|
||||
prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
|
||||
/*
|
||||
laser = 1
|
||||
hand_tele = 2
|
||||
plasma_bomb = 3
|
||||
jetpack = 4
|
||||
captain_card = 5
|
||||
captain_suit = 6
|
||||
|
||||
destroy_plasma = 1
|
||||
destroy_ai = 2
|
||||
kill_monkeys = 3
|
||||
cut_power = 4
|
||||
|
||||
percentage_plasma_destroy = 70 // what percentage of the plasma tanks you gotta destroy
|
||||
percentage_station_cut_power = 80 // what percentage of the tiles have to have power cut
|
||||
percentage_station_evacuate = 80 // what percentage of people gotta leave - you also gotta change the objective in the traitor menu
|
||||
*/
|
||||
waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
@@ -53,12 +37,6 @@
|
||||
world << "<B>The current game mode is - Changeling!</B>"
|
||||
world << "<B>There are alien changelings on the station. Do not let the changelings succeed!</B>"
|
||||
|
||||
/*/datum/game_mode/changeling/can_start()
|
||||
for(var/mob/new_player/P in world)
|
||||
if(P.client && P.ready && !jobban_isbanned(P, "Syndicate"))
|
||||
return 1
|
||||
return 0*/
|
||||
|
||||
/datum/game_mode/changeling/pre_setup()
|
||||
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
|
||||
|
||||
|
||||
@@ -10,14 +10,6 @@
|
||||
world << "<B>The current game mode is - Traitor+Changeling!</B>"
|
||||
world << "<B>There is an alien creature on the station along with some syndicate operatives out for their own gain! Do not let the changeling and the traitors succeed!</B>"
|
||||
|
||||
/*/datum/game_mode/traitor/changeling/can_start()
|
||||
var/count = 0
|
||||
for(var/mob/new_player/P in world)
|
||||
if(P.client && P.ready && !jobban_isbanned(P, "Syndicate"))
|
||||
count++
|
||||
if (count==2)
|
||||
return 1
|
||||
return 0*/
|
||||
|
||||
/datum/game_mode/traitor/changeling/pre_setup()
|
||||
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
|
||||
|
||||
@@ -45,17 +45,6 @@
|
||||
world << "<B>Some crewmembers are attempting to start a cult!<BR>\nCultists - complete your objectives. Convert crewmembers to your cause by using the convert rune. Remember - there is no you, there is only the cult.<BR>\nPersonnel - Do not let the cult succeed in its mission. Brainwashing them with the chaplain's bible reverts them to whatever CentCom-allowed faith they had.</B>"
|
||||
|
||||
|
||||
/*/datum/game_mode/cult/can_start()
|
||||
var/list/cultists_possible = get_players_for_role(BE_CULTIST)
|
||||
|
||||
if (cultists_possible.len < min_cultists_to_start)
|
||||
return 0
|
||||
var/non_cultists = num_players() - min(max_cultists_to_start,cultists_possible.len)
|
||||
if (non_cultists < 1)
|
||||
return 0
|
||||
return 1*/
|
||||
|
||||
|
||||
/datum/game_mode/cult/pre_setup()
|
||||
if(prob(50))
|
||||
objectives += "survive"
|
||||
|
||||
@@ -11,6 +11,3 @@
|
||||
setup_sectors()
|
||||
spawn_exporation_packs()
|
||||
return 1
|
||||
|
||||
//datum/game_mode/extended/can_start()
|
||||
// return (num_players() > 0)
|
||||
@@ -67,18 +67,6 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
//Configure mode and assign player to special mode stuff
|
||||
|
||||
/* if (src.mode.config_tag == "revolution")
|
||||
var/tries=5
|
||||
do
|
||||
can_continue = src.mode.pre_setup()
|
||||
while (tries-- && !can_continue)
|
||||
if (!can_continue)
|
||||
del(mode)
|
||||
current_state = GAME_STATE_PREGAME
|
||||
world << "<B>Error setting up revolution.</B> Not enough players. Reverting to pre-game lobby."
|
||||
return 0
|
||||
else*/
|
||||
|
||||
DivideOccupations() //Distribute jobs
|
||||
var/can_continue = src.mode.pre_setup()//Setup special modes
|
||||
if(!can_continue)
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"Species 3157"
|
||||
)
|
||||
|
||||
|
||||
/datum/intercept_text/proc/build(var/mode_type, datum/mind/correct_person)
|
||||
switch(mode_type)
|
||||
if("revolution")
|
||||
@@ -84,24 +85,27 @@
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
/datum/intercept_text/proc/pick_mob()
|
||||
var/list/dudes = list()
|
||||
for(var/mob/living/carbon/human/man in world)
|
||||
if (!man.mind) continue
|
||||
if (man.mind.assigned_role=="MODE") continue
|
||||
dudes += man
|
||||
if (dudes.len==0)
|
||||
if(dudes.len==0)
|
||||
return null
|
||||
return pick(dudes)
|
||||
|
||||
|
||||
/datum/intercept_text/proc/pick_fingerprints()
|
||||
var/mob/living/carbon/human/dude = src.pick_mob()
|
||||
//if (!dude) return pick_fingerprints() //who coded that is totally crasy or just a traitor. -- rastaf0
|
||||
if (dude)
|
||||
if(dude)
|
||||
return num2text(md5(dude.dna.uni_identity))
|
||||
else
|
||||
return num2text(md5(num2text(rand(1,10000))))
|
||||
|
||||
|
||||
/datum/intercept_text/proc/build_traitor(datum/mind/correct_person)
|
||||
var/name_1 = pick(src.org_names_1)
|
||||
var/name_2 = pick(src.org_names_2)
|
||||
@@ -127,6 +131,7 @@
|
||||
src.text += "discovered the following set of fingerprints ([fingerprints]) on sensitive materials, and their owner should be closely observed."
|
||||
src.text += "However, these could also belong to a current Cent. Com employee, so do not act on this without reason."
|
||||
|
||||
|
||||
/datum/intercept_text/proc/build_cult(datum/mind/correct_person)
|
||||
var/name_1 = pick(src.org_names_1)
|
||||
var/name_2 = pick(src.org_names_2)
|
||||
@@ -160,6 +165,7 @@
|
||||
src.text += "organisation."
|
||||
src.text += "<BR>However, if this information is acted on without substantial evidence, those responsible will face severe repercussions."
|
||||
|
||||
|
||||
/datum/intercept_text/proc/build_rev(datum/mind/correct_person)
|
||||
var/name_1 = pick(src.org_names_1)
|
||||
var/name_2 = pick(src.org_names_2)
|
||||
|
||||
@@ -10,22 +10,17 @@
|
||||
var/const/waittime_h = 1800 // started at 1800
|
||||
|
||||
var/AI_win_timeleft = 1800 //started at 1800, in case I change this for testing round end.
|
||||
//var/intercept_hacked = 0 // moved to game_mode.dm
|
||||
var/malf_mode_declared = 0
|
||||
var/station_captured = 0
|
||||
var/to_nuke_or_not_to_nuke = 0
|
||||
var/apcs = 0 //Adding dis to track how many APCs the AI hacks. --NeoFite
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/announce()
|
||||
world << "<B>The current game mode is - AI Malfunction!</B>"
|
||||
world << "<B>The AI on the satellite has malfunctioned and must be destroyed.</B>"
|
||||
world << "The AI satellite is deep in space and can only be accessed with the use of a teleporter! You have [AI_win_timeleft/60] minutes to disable it."
|
||||
|
||||
/*/datum/game_mode/malfunction/can_start()
|
||||
for(var/mob/new_player/P in world)
|
||||
if(P.client && P.ready && !jobban_isbanned(P, "AI") && !jobban_isbanned(P, "Syndicate"))
|
||||
return 1
|
||||
return 0*/
|
||||
|
||||
/datum/game_mode/malfunction/pre_setup()
|
||||
for(var/mob/new_player/player in world)
|
||||
@@ -35,8 +30,8 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/game_mode/malfunction/post_setup()
|
||||
|
||||
/datum/game_mode/malfunction/post_setup()
|
||||
for(var/datum/mind/AI_mind in malf_ai)
|
||||
if(malf_ai.len < 1)
|
||||
world << "Uh oh, its malfunction and there is no AI! Please report this."
|
||||
@@ -71,6 +66,7 @@
|
||||
send_intercept()
|
||||
..()
|
||||
|
||||
|
||||
/datum/game_mode/proc/greet_malf(var/datum/mind/malf)
|
||||
malf.current << "\red<font size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font>"
|
||||
malf.current << "<B>The crew do not know you have malfunctioned. You may keep it a secret or go wild.</B>"
|
||||
@@ -80,9 +76,11 @@
|
||||
malf.current << "When you feel you have enough APCs under your control, you may begin the takeover attempt."
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/proc/hack_intercept()
|
||||
intercept_hacked = 1
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/process()
|
||||
if (apcs >= 3 && malf_mode_declared)
|
||||
AI_win_timeleft -= (apcs/3) //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
|
||||
@@ -91,6 +89,7 @@
|
||||
check_win()
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/check_win()
|
||||
if (AI_win_timeleft <= 0 && !station_captured)
|
||||
station_captured = 1
|
||||
@@ -99,6 +98,7 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/proc/capture_the_station()
|
||||
world << "<FONT size = 3><B>The AI has won!</B></FONT>"
|
||||
world << "<B>It has fully taken control of all of [station_name()]'s systems.</B>"
|
||||
@@ -115,6 +115,7 @@
|
||||
to_nuke_or_not_to_nuke = 0
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/proc/is_malf_ai_dead()
|
||||
var/all_dead = 1
|
||||
for(var/datum/mind/AI_mind in malf_ai)
|
||||
@@ -122,6 +123,7 @@
|
||||
all_dead = 0
|
||||
return all_dead
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/check_finished()
|
||||
if (station_captured && !to_nuke_or_not_to_nuke)
|
||||
return 1
|
||||
@@ -129,12 +131,14 @@
|
||||
return 1
|
||||
return ..() //check for shuttle and nuke
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["ai_win"])
|
||||
ai_win()
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/proc/takeover()
|
||||
set category = "Malfunction"
|
||||
set name = "System Override"
|
||||
@@ -153,6 +157,7 @@
|
||||
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
|
||||
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/proc/ai_win()
|
||||
set category = "Malfunction"
|
||||
set name = "Explode"
|
||||
@@ -217,6 +222,7 @@
|
||||
..()
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_malfunction()
|
||||
if (malf_ai.len!=0 || istype(ticker.mode,/datum/game_mode/malfunction))
|
||||
if (malf_ai.len==1)
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
var/nometeors = 1
|
||||
required_players = 0
|
||||
|
||||
|
||||
/datum/game_mode/meteor/announce()
|
||||
world << "<B>The current game mode is - Meteor!</B>"
|
||||
world << "<B>The space station has been stuck in a major meteor shower. You must escape from the station or at least live.</B>"
|
||||
|
||||
|
||||
/datum/game_mode/meteor/post_setup()
|
||||
defer_powernet_rebuild = 2//Might help with the lag
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
@@ -18,16 +20,6 @@
|
||||
spawn(meteordelay)
|
||||
nometeors = 0
|
||||
|
||||
/*/datum/game_mode/meteor/can_start()
|
||||
var/num_players = 0
|
||||
for(var/mob/new_player/P in world)
|
||||
if(P.client && P.ready)
|
||||
num_players++
|
||||
|
||||
if(num_players >= 10)
|
||||
return 1 // needs at least 10 players in order to play this mode
|
||||
|
||||
return 0*/
|
||||
|
||||
/datum/game_mode/meteor/process()
|
||||
if(nometeors) return
|
||||
@@ -40,6 +32,7 @@
|
||||
if(prob(10)) meteor_wave()
|
||||
else spawn_meteors()
|
||||
|
||||
|
||||
/datum/game_mode/meteor/declare_completion()
|
||||
var/list/survivors = list()
|
||||
var/area/escape_zone = locate(/area/shuttle/escape/centcom)
|
||||
@@ -52,8 +45,6 @@
|
||||
survivors[player.real_name] = "shuttle"
|
||||
else
|
||||
survivors[player.real_name] = "alive"
|
||||
// if (istype(player.loc, /obj/machinery/vehicle/pod))
|
||||
// survivors[player.real_name] = "pod"
|
||||
|
||||
if (survivors.len)
|
||||
world << "\blue <B>The following survived the meteor attack!</B>"
|
||||
@@ -71,30 +62,3 @@
|
||||
|
||||
..()
|
||||
return 1
|
||||
/* This is dealt with in the parents code
|
||||
/datum/game_mode/meteor/send_intercept()
|
||||
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested staus information:</FONT><HR>"
|
||||
intercepttext += "<B> Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:</B>"
|
||||
|
||||
var/list/possible_modes = list()
|
||||
possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf", "changeling", "cult")
|
||||
var/number = pick(2, 3)
|
||||
var/i = 0
|
||||
for(i = 0, i < number, i++)
|
||||
possible_modes.Remove(pick(possible_modes))
|
||||
|
||||
var/datum/intercept_text/i_text = new /datum/intercept_text
|
||||
for(var/A in possible_modes)
|
||||
intercepttext += i_text.build(A, pick(ticker.minds))
|
||||
|
||||
for (var/obj/machinery/computer/communications/comm in world)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
|
||||
intercept.name = "paper- 'Cent. Com. Status Summary'"
|
||||
intercept.info = intercepttext
|
||||
|
||||
comm.messagetitle.Add("Cent. Com. Status Summary")
|
||||
comm.messagetext.Add(intercepttext)
|
||||
|
||||
command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.")
|
||||
world << sound('intercept.ogg')*/
|
||||
@@ -17,6 +17,7 @@
|
||||
var/herp = 0 //Used for tracking if the syndies got the shuttle off of the z-level
|
||||
//It is so hillarious so I wont rename those two variables --rastaf0
|
||||
|
||||
|
||||
/datum/game_mode/nuclear/announce()
|
||||
world << "<B>The current game mode is - Nuclear Emergency!</B>"
|
||||
world << "<B>A [syndicate_name()] Strike Force is approaching [station_name()]!</B>"
|
||||
@@ -153,6 +154,7 @@
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code)
|
||||
var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
|
||||
spawn(1)
|
||||
@@ -184,11 +186,13 @@
|
||||
synd_mind.current << "Nuclear Explosives 101:\n\tHello and thank you for choosing the Syndicate for your nuclear information needs.\nToday's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.\nFirst and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.\nPressing any button on the compacted bomb will cause it to extend and bolt itself into place.\nIf this is done to unbolt it one must compeltely log in which at this time may not be possible.\nTo make the device functional:\n1. Place bomb in designated detonation zone\n2. Extend and anchor bomb (attack with hand).\n3. Insert Nuclear Auth. Disk into slot.\n4. Type numeric code into keypad ([nuke_code]).\n\tNote: If you make a mistake press R to reset the device.\n5. Press the E button to log onto the device\nYou now have activated the device. To deactivate the buttons at anytime for example when\nyou've already prepped the bomb for detonation remove the auth disk OR press the R ont he keypad.\nNow the bomb CAN ONLY be detonated using the timer. A manual det. is not an option.\n\tNote: Nanotrasen is a pain in the neck.\nToggle off the SAFETY.\n\tNote: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step\nSo use the - - and + + to set a det time between 5 seconds and 10 minutes.\nThen press the timer toggle button to start the countdown.\nNow remove the auth. disk so that the buttons deactivate.\n\tNote: THE BOMB IS STILL SET AND WILL DETONATE\nNow before you remove the disk if you need to move the bomb you can:\nToggle off the anchor, move it, and re-anchor.\n\nGood luck. Remember the order:\nDisk, Code, Safety, Timer, Disk, RUN!\nIntelligence Analysts believe that they are hiding the disk in the bridge. Your space ship will not leave until the bomb is armed and timing.\nGood luck!"
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/proc/forge_syndicate_objectives(var/datum/mind/syndicate)
|
||||
var/datum/objective/nuclear/syndobj = new
|
||||
syndobj.owner = syndicate
|
||||
syndicate.objectives += syndobj
|
||||
|
||||
|
||||
/datum/game_mode/proc/greet_syndicate(var/datum/mind/syndicate, var/you_are=1)
|
||||
if (you_are)
|
||||
syndicate.current << "\blue You are a [syndicate_name()] agent!"
|
||||
@@ -198,9 +202,11 @@
|
||||
obj_count++
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/proc/random_radio_frequency()
|
||||
return 1337
|
||||
|
||||
|
||||
/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob)
|
||||
var/radio_freq = random_radio_frequency()
|
||||
|
||||
@@ -220,11 +226,13 @@
|
||||
synd_mob.equip_if_possible(new /obj/item/weapon/gun/projectile/automatic/mini_uzi(synd_mob), synd_mob.slot_belt)
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/nuclear/check_win()
|
||||
if (nukes_left == 0)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/game_mode/proc/is_operatives_are_dead()
|
||||
for(var/datum/mind/operative_mind in syndicates)
|
||||
if (!istype(operative_mind.current,/mob/living/carbon/human))
|
||||
@@ -233,6 +241,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/nuclear/declare_completion()
|
||||
var/disk_rescued = 1
|
||||
for(var/obj/item/weapon/disk/nuclear/D in world)
|
||||
@@ -298,6 +307,7 @@
|
||||
text += "[mind.key] (character destroyed)"
|
||||
world << text
|
||||
|
||||
|
||||
/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
|
||||
var/randomname = pick(last_names)
|
||||
var/newname = input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)
|
||||
|
||||
@@ -30,33 +30,6 @@
|
||||
world << "<B>The current game mode is - Revolution!</B>"
|
||||
world << "<B>Some crewmembers are attempting to start a revolution!<BR>\nRevolutionaries - Kill the Captain, HoP, HoS, CE, RD and CMO. Convert other crewmembers (excluding the heads of staff, and security officers) to your cause by flashing them. Protect your leaders.<BR>\nPersonnel - Protect the heads of staff. Kill the leaders of the revolution, and brainwash the other revolutionaries (by beating them in the head).</B>"
|
||||
|
||||
/*
|
||||
/datum/game_mode/revolution/can_start() //this proc can not do its job properly for this gamemode, pre_setup can fail even whe can_start told everything is okay. --rastaf0
|
||||
var/list/mob/new_player/possible_headrevs = new
|
||||
var/list/mob/new_player/possible_heads = new
|
||||
var/players = 0
|
||||
for(var/mob/new_player/P in world)
|
||||
if (!P.client || !P.ready)
|
||||
continue
|
||||
players++
|
||||
if(!jobban_isbanned(P, "Syndicate"))
|
||||
possible_headrevs += P
|
||||
for (var/i in head_positions)
|
||||
if(!jobban_isbanned(P, i))
|
||||
possible_heads += P
|
||||
break
|
||||
//lets do as best as we can
|
||||
if (players < min_players)
|
||||
return 0
|
||||
if (possible_headrevs.len==0)
|
||||
return 0
|
||||
if (possible_heads.len==0)
|
||||
return 0
|
||||
if (possible_headrevs.len<=max_headrevs)
|
||||
var/list/rest_heads = possible_heads - possible_headrevs
|
||||
return (rest_heads.len>0)
|
||||
return 1 //read as "maybe"
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//Gets the round setup, cancelling if there's not enough players at the start//
|
||||
@@ -198,6 +171,7 @@
|
||||
/datum/game_mode/proc/remove_revolutionary(datum/mind/rev_mind)
|
||||
if(rev_mind in revolutionaries)
|
||||
revolutionaries -= rev_mind
|
||||
rev_mind.special_role = null
|
||||
rev_mind.current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a revolutionary!</B></FONT>"
|
||||
update_rev_icons_removed(rev_mind)
|
||||
for(var/mob/living/M in view(rev_mind.current))
|
||||
@@ -285,15 +259,16 @@
|
||||
if(head_rev_mind.current)
|
||||
if(head_rev_mind.current.client)
|
||||
for(var/image/I in head_rev_mind.current.client.images)
|
||||
if((I.icon_state == "cult"|| I.icon_state == "rev_head") && I.loc == rev_mind.current)
|
||||
if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current)
|
||||
del(I)
|
||||
|
||||
for(var/datum/mind/rev_mind_1 in revolutionaries)
|
||||
if(rev_mind_1.current)
|
||||
if(rev_mind_1.current.client)
|
||||
for(var/image/I in rev_mind_1.current.client.images)
|
||||
if((I.icon_state == "cult"|| I.icon_state == "rev_head") && I.loc == rev_mind.current)
|
||||
if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current)
|
||||
del(I)
|
||||
|
||||
if(rev_mind.current)
|
||||
if(rev_mind.current.client)
|
||||
for(var/image/I in rev_mind.current.client.images)
|
||||
|
||||
@@ -18,6 +18,3 @@
|
||||
|
||||
/datum/game_mode/sandbox/check_finished()
|
||||
return 0
|
||||
|
||||
/datum/game_mode/sandbox/can_start()
|
||||
return 1
|
||||
@@ -5,59 +5,21 @@
|
||||
/datum/game_mode/traitor
|
||||
name = "traitor"
|
||||
config_tag = "traitor"
|
||||
restricted_jobs = list("Cyborg")
|
||||
restricted_jobs = list("Cyborg", "Security Officer", "Warden", "Detective", "Head of Security")//Approved by headmins for a week test
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
|
||||
|
||||
var/const/prob_int_item = 50 // intercept names the theft target half the time
|
||||
var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target
|
||||
var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target
|
||||
|
||||
var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time
|
||||
var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
|
||||
var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
|
||||
|
||||
var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative
|
||||
var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative
|
||||
var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
|
||||
var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
|
||||
/*
|
||||
var/const/laser = 1
|
||||
var/const/hand_tele = 2
|
||||
var/const/plasma_bomb = 3
|
||||
var/const/jetpack = 4
|
||||
var/const/captain_card = 5
|
||||
var/const/captain_suit = 6
|
||||
|
||||
var/const/destroy_plasma = 1
|
||||
var/const/destroy_ai = 2
|
||||
var/const/kill_monkeys = 3
|
||||
var/const/cut_power = 4
|
||||
|
||||
var/const/percentage_plasma_destroy = 70 // what percentage of the plasma tanks you gotta destroy
|
||||
var/const/percentage_station_cut_power = 80 // what percentage of the tiles have to have power cut
|
||||
var/const/percentage_station_evacuate = 80 // what percentage of people gotta leave - you also gotta change the objective in the traitor menu
|
||||
*/
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/traitors_possible = 4 //hard limit on traitors if scaling is turned off
|
||||
var/const/traitor_scaling_coeff = 5.0 //how much does the amount of players get divided by to determine traitors
|
||||
|
||||
|
||||
/datum/game_mode/traitor/announce()
|
||||
world << "<B>The current game mode is - Traitor!</B>"
|
||||
world << "<B>There is a syndicate traitor on the station. Do not let the traitor succeed!</B>"
|
||||
|
||||
/*/datum/game_mode/traitor/can_start()
|
||||
for(var/mob/new_player/P in world)
|
||||
if(P.client && P.ready && !jobban_isbanned(P, "Syndicate"))
|
||||
return 1
|
||||
return 0*/
|
||||
|
||||
/datum/game_mode/traitor/pre_setup()
|
||||
var/list/possible_traitors = get_players_for_role(BE_TRAITOR)
|
||||
@@ -90,6 +52,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/traitor/post_setup()
|
||||
for(var/datum/mind/traitor in traitors)
|
||||
forge_traitor_objectives(traitor)
|
||||
@@ -102,6 +65,7 @@
|
||||
..()
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/proc/forge_traitor_objectives(var/datum/mind/traitor)
|
||||
if(istype(traitor.current, /mob/living/silicon))
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
@@ -144,6 +108,7 @@
|
||||
traitor.objectives += hijack_objective
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/proc/greet_traitor(var/datum/mind/traitor)
|
||||
traitor.current << "<B><font size=3 color=red>You are the traitor.</font></B>"
|
||||
var/obj_count = 1
|
||||
@@ -152,6 +117,7 @@
|
||||
obj_count++
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/proc/finalize_traitor(var/datum/mind/traitor)
|
||||
if (istype(traitor.current, /mob/living/silicon))
|
||||
add_law_zero(traitor.current)
|
||||
@@ -159,9 +125,11 @@
|
||||
equip_traitor(traitor.current)
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/traitor/declare_completion()
|
||||
return//Traitors will be checked as part of check_extra_completion. Leaving this here as a reminder.
|
||||
|
||||
|
||||
/datum/game_mode/proc/add_law_zero(mob/living/silicon/ai/killer)
|
||||
var/law = "Accomplish your objectives at all costs."
|
||||
killer << "<b>Your laws have been changed!</b>"
|
||||
@@ -183,6 +151,7 @@
|
||||
killer << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe."
|
||||
//End code phrase.
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_traitor()
|
||||
for(var/datum/mind/traitor in traitors)
|
||||
var/traitor_name
|
||||
@@ -216,7 +185,6 @@
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/game_mode/proc/equip_traitor(mob/living/carbon/human/traitor_mob, var/safety = 0)
|
||||
if (!istype(traitor_mob))
|
||||
return
|
||||
|
||||
341
code/game/gamemodes/wizard/spellbook.dm
Normal file
341
code/game/gamemodes/wizard/spellbook.dm
Normal file
@@ -0,0 +1,341 @@
|
||||
|
||||
//SPELL BOOK PROCS
|
||||
|
||||
/obj/item/weapon/spellbook/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = "<B>The Book of Spells:</B><BR>"
|
||||
dat += "Spells left to memorize: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Memorize which spell:</B><BR>"
|
||||
dat += "<I>The number after the spell name is the cooldown time.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=1'>Magic Missile</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=2'>Fireball</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=3'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=4'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=5'>Smoke</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=6'>Blind</A> (30)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=7'>Mind Transfer</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=8'>Forcewall</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=9'>Blink</A> (2)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=10'>Teleport</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=11'>Mutate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=12'>Ethereal Jaunt</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=13'>Knock</A> (10)<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=14'>Re-memorize Spells</A><BR>"
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/spellbook/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src,usr) && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
if(href_list["spell_choice"])
|
||||
if(src.uses >= 1 && href_list["spell_choice"] != 14)
|
||||
src.uses--
|
||||
if(spell_type == "verb")
|
||||
switch(href_list["spell_choice"])
|
||||
if ("1")
|
||||
usr.verbs += /client/proc/magicmissile
|
||||
usr.mind.special_verbs += /client/proc/magicmissile
|
||||
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
if ("2")
|
||||
usr.verbs += /client/proc/fireball
|
||||
usr.mind.special_verbs += /client/proc/fireball
|
||||
src.temp = "This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
if ("3")
|
||||
usr.verbs += /mob/proc/kill
|
||||
usr.mind.special_verbs += /mob/proc/kill
|
||||
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
if ("4")
|
||||
usr.verbs += /mob/proc/tech
|
||||
usr.mind.special_verbs += /mob/proc/tech
|
||||
src.temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
if ("5")
|
||||
usr.verbs += /client/proc/smokecloud
|
||||
usr.mind.special_verbs += /client/proc/smokecloud
|
||||
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
if ("6")
|
||||
usr.verbs += /client/proc/blind
|
||||
usr.mind.special_verbs += /client/proc/blind
|
||||
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
if ("7")
|
||||
usr.verbs += /mob/proc/swap
|
||||
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
if ("8")
|
||||
usr.verbs += /client/proc/forcewall
|
||||
usr.mind.special_verbs += /client/proc/forcewall
|
||||
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
if ("9")
|
||||
usr.verbs += /client/proc/blink
|
||||
usr.mind.special_verbs += /client/proc/blink
|
||||
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
if ("10")
|
||||
usr.verbs += /mob/proc/teleport
|
||||
usr.mind.special_verbs += /mob/proc/teleport
|
||||
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
if ("11")
|
||||
usr.verbs += /client/proc/mutate
|
||||
usr.mind.special_verbs += /client/proc/mutate
|
||||
src.temp = "This spell causes you to turn into a hulk and gain laser vision for a short while."
|
||||
if ("12")
|
||||
usr.verbs += /client/proc/jaunt
|
||||
usr.mind.special_verbs += /client/proc/jaunt
|
||||
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
if ("13")
|
||||
usr.verbs += /client/proc/knock
|
||||
usr.mind.special_verbs += /client/proc/knock
|
||||
src.temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
else if(spell_type == "object")
|
||||
var/list/available_spells = list("Magic Missile","Fireball","Disintegrate","Disable Tech","Smoke","Blind","Mind Transfer","Forcewall","Blink","Teleport","Mutate","Ethereal Jaunt","Knock")
|
||||
var/already_knows = 0
|
||||
for(var/obj/proc_holder/spell/aspell in usr.spell_list)
|
||||
if(available_spells[text2num(href_list["spell_choice"])] == aspell.name)
|
||||
already_knows = 1
|
||||
src.temp = "You already know that spell."
|
||||
src.uses++
|
||||
break
|
||||
if(!already_knows)
|
||||
switch(href_list["spell_choice"])
|
||||
if ("1")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/projectile/magic_missile(usr)
|
||||
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
if ("2")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/projectile/fireball(usr)
|
||||
src.temp = "This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
if ("3")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/inflict_handler/disintegrate(usr)
|
||||
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
if ("4")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/emplosion/disable_tech(usr)
|
||||
src.temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
if ("5")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/smoke(usr)
|
||||
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
if ("6")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/trigger/blind(usr)
|
||||
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
if ("7")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/mind_transfer(usr)
|
||||
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
if ("8")
|
||||
usr.spell_list += new /obj/proc_holder/spell/aoe_turf/conjure/forcewall(usr)
|
||||
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
if ("9")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/turf_teleport/blink(usr)
|
||||
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
if ("10")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/area_teleport/teleport(usr)
|
||||
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
if ("11")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/genetic/mutate(usr)
|
||||
src.temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
|
||||
if ("12")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/ethereal_jaunt(usr)
|
||||
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
if ("13")
|
||||
usr.spell_list += new /obj/proc_holder/spell/aoe_turf/knock(usr)
|
||||
src.temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
if (href_list["spell_choice"] == "14")
|
||||
var/area/wizard_station/A = locate()
|
||||
if(usr in A.contents)
|
||||
src.uses = src.max_uses
|
||||
usr.spellremove(usr,spell_type)
|
||||
src.temp = "All spells have been removed. You may now memorize a new set of spells."
|
||||
else
|
||||
src.temp = "You may only re-memorize spells whilst located inside the wizard sanctuary."
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
return
|
||||
|
||||
//SWF UPLINK PROCS
|
||||
/obj/item/weapon/SWF_uplink/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.selfdestruct)
|
||||
dat = "Self Destructing..."
|
||||
else
|
||||
if (src.temp)
|
||||
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = "<B>Syndicate Uplink Console:</B><BR>"
|
||||
dat += "Tele-Crystals left: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Request item:</B><BR>"
|
||||
dat += "<I>Each item costs 1 telecrystal. The number afterwards is the cooldown time.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_magicmissile=1'>Magic Missile</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_fireball=1'>Fireball</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_disintegrate=1'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_emp=1'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_smoke=1'>Smoke</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_blind=1'>Blind</A> (30)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_swap=1'>Mind Transfer</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_forcewall=1'>Forcewall</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_blink=1'>Blink</A> (2)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_teleport=1'>Teleport</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_mutate=1'>Mutate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_jaunt=1'>Ethereal Jaunt</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_knock=1'>Knock</A> (10)<BR>"
|
||||
dat += "<HR>"
|
||||
if (src.origradio)
|
||||
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</A><BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];selfdestruct=1'>Self-Destruct</A>"
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
/obj/item/weapon/SWF_uplink/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src,usr) && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
if (href_list["spell_magicmissile"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/magicmissile
|
||||
usr.mind.special_verbs += /client/proc/magicmissile
|
||||
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
else if (href_list["spell_fireball"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/fireball
|
||||
usr.mind.special_verbs += /client/proc/fireball
|
||||
src.temp = "This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
else if (href_list["spell_disintegrate"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/kill
|
||||
usr.mind.special_verbs += /mob/proc/kill
|
||||
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
else if (href_list["spell_emp"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/tech
|
||||
usr.mind.special_verbs += /mob/proc/tech
|
||||
src.temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
else if (href_list["spell_smoke"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/smokecloud
|
||||
usr.mind.special_verbs += /client/proc/smokecloud
|
||||
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
else if (href_list["spell_blind"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/blind
|
||||
usr.mind.special_verbs += /client/proc/blind
|
||||
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
else if (href_list["spell_swap"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/swap
|
||||
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
else if (href_list["spell_forcewall"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/forcewall
|
||||
usr.mind.special_verbs += /client/proc/forcewall
|
||||
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
else if (href_list["spell_blink"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/blink
|
||||
usr.mind.special_verbs += /client/proc/blink
|
||||
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
else if (href_list["spell_teleport"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/teleport
|
||||
usr.mind.special_verbs += /mob/proc/teleport
|
||||
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
else if (href_list["spell_mutate"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/mutate
|
||||
usr.mind.special_verbs += /client/proc/mutate
|
||||
src.temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
|
||||
else if (href_list["spell_jaunt"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/jaunt
|
||||
usr.mind.special_verbs += /client/proc/jaunt
|
||||
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
else if (href_list["spell_knock"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/knock
|
||||
usr.mind.special_verbs += /client/proc/knock
|
||||
src.temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
else if (href_list["lock"] && src.origradio)
|
||||
// presto chango, a regular radio again! (reset the freq too...)
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=radio")
|
||||
var/obj/item/device/radio/T = src.origradio
|
||||
var/obj/item/weapon/SWF_uplink/R = src
|
||||
R.loc = T
|
||||
T.loc = usr
|
||||
// R.layer = initial(R.layer)
|
||||
R.layer = 0
|
||||
if (usr.client)
|
||||
usr.client.screen -= R
|
||||
if (usr.r_hand == R)
|
||||
usr.u_equip(R)
|
||||
usr.r_hand = T
|
||||
else
|
||||
usr.u_equip(R)
|
||||
usr.l_hand = T
|
||||
R.loc = T
|
||||
T.layer = 20
|
||||
T.set_frequency(initial(T.frequency))
|
||||
T.attack_self(usr)
|
||||
return
|
||||
else if (href_list["selfdestruct"])
|
||||
src.temp = "<A href='byond://?src=\ref[src];selfdestruct2=1'>Self-Destruct</A>"
|
||||
else if (href_list["selfdestruct2"])
|
||||
src.selfdestruct = 1
|
||||
spawn (100)
|
||||
explode()
|
||||
return
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
return
|
||||
|
||||
/obj/item/weapon/SWF_uplink/proc/explode()
|
||||
var/turf/location = get_turf(src.loc)
|
||||
location.hotspot_expose(700, 125)
|
||||
|
||||
explosion(location, 0, 0, 2, 4)
|
||||
|
||||
del(src.master)
|
||||
del(src)
|
||||
return
|
||||
@@ -10,53 +10,15 @@
|
||||
|
||||
var/finished = 0
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
|
||||
|
||||
var/const/prob_int_item = 50 // intercept names the theft target half the time
|
||||
var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target
|
||||
var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target
|
||||
|
||||
var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time
|
||||
var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
|
||||
var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
|
||||
|
||||
var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative
|
||||
var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative
|
||||
var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
|
||||
var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
|
||||
|
||||
//apparently BYOND doesn't have enums, so this seems to be the best approximation
|
||||
var/const/obj_murder = 1
|
||||
var/const/obj_hijack = 2
|
||||
var/const/obj_steal = 3
|
||||
var/const/obj_sabotage = 4
|
||||
|
||||
|
||||
var/const/laser = 1
|
||||
var/const/hand_tele = 2
|
||||
var/const/plasma_bomb = 3
|
||||
var/const/jetpack = 4
|
||||
var/const/captain_card = 5
|
||||
var/const/captain_suit = 6
|
||||
|
||||
var/const/destroy_plasma = 1
|
||||
var/const/destroy_ai = 2
|
||||
var/const/kill_monkeys = 3
|
||||
var/const/cut_power = 4
|
||||
|
||||
var/const/percentage_plasma_destroy = 70 // what percentage of the plasma tanks you gotta destroy
|
||||
var/const/percentage_station_cut_power = 80 // what percentage of the tiles have to have power cut
|
||||
var/const/percentage_station_evacuate = 80 // what percentage of people gotta leave
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
|
||||
/datum/game_mode/wizard/announce()
|
||||
world << "<B>The current game mode is - Wizard!</B>"
|
||||
world << "<B>There is a \red SPACE WIZARD\black on the station. You can't let him achieve his objective!</B>"
|
||||
|
||||
|
||||
/datum/game_mode/wizard/can_start()//This could be better, will likely have to recode it later
|
||||
if(!..())
|
||||
return 0
|
||||
@@ -72,13 +34,16 @@
|
||||
if(wizardstart.len == 0)
|
||||
wizard.current << "<B>\red A starting location for you could not be found, please report this bug!</B>"
|
||||
return 0
|
||||
else
|
||||
wizard.current.loc = pick(wizardstart)
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/wizard/pre_setup()
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
wizard.current.loc = pick(wizardstart)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/wizard/post_setup()
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
forge_wizard_objectives(wizard)
|
||||
@@ -160,6 +125,7 @@
|
||||
wizard_mob.name = newname
|
||||
return
|
||||
|
||||
|
||||
/datum/game_mode/proc/greet_wizard(var/datum/mind/wizard, var/you_are=1)
|
||||
if (you_are)
|
||||
wizard.current << "<B>\red You are the Space Wizard!</B>"
|
||||
@@ -181,6 +147,7 @@
|
||||
else
|
||||
wizard_mob.spell_list += new /obj/proc_holder/spell/targeted/ethereal_jaunt(usr)
|
||||
|
||||
|
||||
/datum/game_mode/proc/equip_wizard(mob/living/carbon/human/wizard_mob)
|
||||
if (!istype(wizard_mob))
|
||||
return
|
||||
@@ -228,12 +195,14 @@
|
||||
finished = 1
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/wizard/declare_completion()
|
||||
if(finished)
|
||||
world << "\red <FONT size = 3><B> The wizard[(wizards.len>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!</B></FONT>"
|
||||
..()
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_wizard()
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
var/wizard_name
|
||||
@@ -263,346 +232,6 @@
|
||||
world << "<B>The wizard has failed!<B>"
|
||||
return 1
|
||||
|
||||
//SPELL BOOK PROCS
|
||||
|
||||
/obj/item/weapon/spellbook/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = "<B>The Book of Spells:</B><BR>"
|
||||
dat += "Spells left to memorize: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Memorize which spell:</B><BR>"
|
||||
dat += "<I>The number after the spell name is the cooldown time.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=1'>Magic Missile</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=2'>Fireball</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=3'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=4'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=5'>Smoke</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=6'>Blind</A> (30)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=7'>Mind Transfer</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=8'>Forcewall</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=9'>Blink</A> (2)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=10'>Teleport</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=11'>Mutate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=12'>Ethereal Jaunt</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=13'>Knock</A> (10)<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=14'>Re-memorize Spells</A><BR>"
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
/obj/item/weapon/spellbook/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src,usr) && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
if(href_list["spell_choice"])
|
||||
if(src.uses >= 1 && href_list["spell_choice"] != 14)
|
||||
src.uses--
|
||||
if(spell_type == "verb")
|
||||
switch(href_list["spell_choice"])
|
||||
if ("1")
|
||||
usr.verbs += /client/proc/magicmissile
|
||||
usr.mind.special_verbs += /client/proc/magicmissile
|
||||
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
if ("2")
|
||||
usr.verbs += /client/proc/fireball
|
||||
usr.mind.special_verbs += /client/proc/fireball
|
||||
src.temp = "This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
if ("3")
|
||||
usr.verbs += /mob/proc/kill
|
||||
usr.mind.special_verbs += /mob/proc/kill
|
||||
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
if ("4")
|
||||
usr.verbs += /mob/proc/tech
|
||||
usr.mind.special_verbs += /mob/proc/tech
|
||||
src.temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
if ("5")
|
||||
usr.verbs += /client/proc/smokecloud
|
||||
usr.mind.special_verbs += /client/proc/smokecloud
|
||||
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
if ("6")
|
||||
usr.verbs += /client/proc/blind
|
||||
usr.mind.special_verbs += /client/proc/blind
|
||||
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
if ("7")
|
||||
usr.verbs += /mob/proc/swap
|
||||
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
if ("8")
|
||||
usr.verbs += /client/proc/forcewall
|
||||
usr.mind.special_verbs += /client/proc/forcewall
|
||||
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
if ("9")
|
||||
usr.verbs += /client/proc/blink
|
||||
usr.mind.special_verbs += /client/proc/blink
|
||||
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
if ("10")
|
||||
usr.verbs += /mob/proc/teleport
|
||||
usr.mind.special_verbs += /mob/proc/teleport
|
||||
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
if ("11")
|
||||
usr.verbs += /client/proc/mutate
|
||||
usr.mind.special_verbs += /client/proc/mutate
|
||||
src.temp = "This spell causes you to turn into a hulk and gain laser vision for a short while."
|
||||
if ("12")
|
||||
usr.verbs += /client/proc/jaunt
|
||||
usr.mind.special_verbs += /client/proc/jaunt
|
||||
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
if ("13")
|
||||
usr.verbs += /client/proc/knock
|
||||
usr.mind.special_verbs += /client/proc/knock
|
||||
src.temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
else if(spell_type == "object")
|
||||
var/list/available_spells = list("Magic Missile","Fireball","Disintegrate","Disable Tech","Smoke","Blind","Mind Transfer","Forcewall","Blink","Teleport","Mutate","Ethereal Jaunt","Knock")
|
||||
var/already_knows = 0
|
||||
for(var/obj/proc_holder/spell/aspell in usr.spell_list)
|
||||
if(available_spells[text2num(href_list["spell_choice"])] == aspell.name)
|
||||
already_knows = 1
|
||||
src.temp = "You already know that spell."
|
||||
src.uses++
|
||||
break
|
||||
if(!already_knows)
|
||||
switch(href_list["spell_choice"])
|
||||
if ("1")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/projectile/magic_missile(usr)
|
||||
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
if ("2")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/projectile/fireball(usr)
|
||||
src.temp = "This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
if ("3")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/inflict_handler/disintegrate(usr)
|
||||
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
if ("4")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/emplosion/disable_tech(usr)
|
||||
src.temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
if ("5")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/smoke(usr)
|
||||
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
if ("6")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/trigger/blind(usr)
|
||||
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
if ("7")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/mind_transfer(usr)
|
||||
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
if ("8")
|
||||
usr.spell_list += new /obj/proc_holder/spell/aoe_turf/conjure/forcewall(usr)
|
||||
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
if ("9")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/turf_teleport/blink(usr)
|
||||
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
if ("10")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/area_teleport/teleport(usr)
|
||||
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
if ("11")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/genetic/mutate(usr)
|
||||
src.temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
|
||||
if ("12")
|
||||
usr.spell_list += new /obj/proc_holder/spell/targeted/ethereal_jaunt(usr)
|
||||
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
if ("13")
|
||||
usr.spell_list += new /obj/proc_holder/spell/aoe_turf/knock(usr)
|
||||
src.temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
if (href_list["spell_choice"] == "14")
|
||||
var/area/wizard_station/A = locate()
|
||||
if(usr in A.contents)
|
||||
src.uses = src.max_uses
|
||||
usr.spellremove(usr,spell_type)
|
||||
src.temp = "All spells have been removed. You may now memorize a new set of spells."
|
||||
else
|
||||
src.temp = "You may only re-memorize spells whilst located inside the wizard sanctuary."
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
return
|
||||
|
||||
//SWF UPLINK PROCS
|
||||
/obj/item/weapon/SWF_uplink/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.selfdestruct)
|
||||
dat = "Self Destructing..."
|
||||
else
|
||||
if (src.temp)
|
||||
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = "<B>Syndicate Uplink Console:</B><BR>"
|
||||
dat += "Tele-Crystals left: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Request item:</B><BR>"
|
||||
dat += "<I>Each item costs 1 telecrystal. The number afterwards is the cooldown time.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_magicmissile=1'>Magic Missile</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_fireball=1'>Fireball</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_disintegrate=1'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_emp=1'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_smoke=1'>Smoke</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_blind=1'>Blind</A> (30)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_swap=1'>Mind Transfer</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_forcewall=1'>Forcewall</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_blink=1'>Blink</A> (2)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_teleport=1'>Teleport</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_mutate=1'>Mutate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_jaunt=1'>Ethereal Jaunt</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_knock=1'>Knock</A> (10)<BR>"
|
||||
dat += "<HR>"
|
||||
if (src.origradio)
|
||||
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</A><BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];selfdestruct=1'>Self-Destruct</A>"
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
/obj/item/weapon/SWF_uplink/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src,usr) && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
if (href_list["spell_magicmissile"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/magicmissile
|
||||
usr.mind.special_verbs += /client/proc/magicmissile
|
||||
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
else if (href_list["spell_fireball"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/fireball
|
||||
usr.mind.special_verbs += /client/proc/fireball
|
||||
src.temp = "This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
else if (href_list["spell_disintegrate"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/kill
|
||||
usr.mind.special_verbs += /mob/proc/kill
|
||||
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
else if (href_list["spell_emp"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/tech
|
||||
usr.mind.special_verbs += /mob/proc/tech
|
||||
src.temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
else if (href_list["spell_smoke"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/smokecloud
|
||||
usr.mind.special_verbs += /client/proc/smokecloud
|
||||
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
else if (href_list["spell_blind"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/blind
|
||||
usr.mind.special_verbs += /client/proc/blind
|
||||
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
else if (href_list["spell_swap"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/swap
|
||||
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
else if (href_list["spell_forcewall"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/forcewall
|
||||
usr.mind.special_verbs += /client/proc/forcewall
|
||||
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
else if (href_list["spell_blink"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/blink
|
||||
usr.mind.special_verbs += /client/proc/blink
|
||||
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
else if (href_list["spell_teleport"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/teleport
|
||||
usr.mind.special_verbs += /mob/proc/teleport
|
||||
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
else if (href_list["spell_mutate"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/mutate
|
||||
usr.mind.special_verbs += /client/proc/mutate
|
||||
src.temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
|
||||
else if (href_list["spell_jaunt"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/jaunt
|
||||
usr.mind.special_verbs += /client/proc/jaunt
|
||||
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
else if (href_list["spell_knock"])
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/knock
|
||||
usr.mind.special_verbs += /client/proc/knock
|
||||
src.temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
else if (href_list["lock"] && src.origradio)
|
||||
// presto chango, a regular radio again! (reset the freq too...)
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=radio")
|
||||
var/obj/item/device/radio/T = src.origradio
|
||||
var/obj/item/weapon/SWF_uplink/R = src
|
||||
R.loc = T
|
||||
T.loc = usr
|
||||
// R.layer = initial(R.layer)
|
||||
R.layer = 0
|
||||
if (usr.client)
|
||||
usr.client.screen -= R
|
||||
if (usr.r_hand == R)
|
||||
usr.u_equip(R)
|
||||
usr.r_hand = T
|
||||
else
|
||||
usr.u_equip(R)
|
||||
usr.l_hand = T
|
||||
R.loc = T
|
||||
T.layer = 20
|
||||
T.set_frequency(initial(T.frequency))
|
||||
T.attack_self(usr)
|
||||
return
|
||||
else if (href_list["selfdestruct"])
|
||||
src.temp = "<A href='byond://?src=\ref[src];selfdestruct2=1'>Self-Destruct</A>"
|
||||
else if (href_list["selfdestruct2"])
|
||||
src.selfdestruct = 1
|
||||
spawn (100)
|
||||
explode()
|
||||
return
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
return
|
||||
|
||||
/obj/item/weapon/SWF_uplink/proc/explode()
|
||||
var/turf/location = get_turf(src.loc)
|
||||
location.hotspot_expose(700, 125)
|
||||
|
||||
explosion(location, 0, 0, 2, 4)
|
||||
|
||||
del(src.master)
|
||||
del(src)
|
||||
return
|
||||
|
||||
//OTHER PROCS
|
||||
|
||||
//To batch-remove wizard spells. Linked to mind.dm.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Desc: Sorta a hack/workaround to get interfaceish things into this engine.
|
||||
To use an interface just override the proc in your object and set it to return true.
|
||||
If an object returns true for one of these it should have ALL of the commented out procs and vars defined in its class.
|
||||
There may be some example code in procs below the defines to help explain things, but you don't have to use it.
|
||||
*/
|
||||
|
||||
|
||||
@@ -27,7 +28,7 @@ Desc: If true is an assembly that can work with the holder
|
||||
Unsecure()//Code that has to happen when the assembly is taken off of the ready state goes here
|
||||
Attach_Assembly(var/obj/A, var/mob/user)//Called when an assembly is attacked by another
|
||||
Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var
|
||||
|
||||
Holder_Movement()//Called when the holder is moved
|
||||
|
||||
IsAssembly()
|
||||
return 1
|
||||
@@ -90,6 +91,8 @@ Desc: If true is an assembly that can work with the holder
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Name: IsAssemblyHolder
|
||||
Desc: If true is an object that can hold an assemblyholder object
|
||||
@@ -98,5 +101,53 @@ Desc: If true is an object that can hold an assemblyholder object
|
||||
return 0
|
||||
/*
|
||||
proc
|
||||
Process_Activation(var/obj/item/device/D)
|
||||
Process_Activation(var/obj/D, var/normal = 1, var/special = 1)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Name: IsSpecialAssembly
|
||||
Desc: If true is an object that can be attached to an assembly holder but is a special thing like a plasma can or door
|
||||
*/
|
||||
|
||||
/obj/proc/IsSpecialAssembly()
|
||||
return 0
|
||||
/*
|
||||
var
|
||||
small_icon_state = null//If this obj will go inside the assembly use this for icons
|
||||
list/small_icon_state_overlays = null//Same here
|
||||
obj/holder = null
|
||||
cooldown = 0//To prevent spam
|
||||
|
||||
proc
|
||||
Activate()//Called when this assembly is pulsed by another one
|
||||
Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var
|
||||
Attach_Holder(var/obj/H, var/mob/user)//Called when an assembly holder attempts to attach, sets src's loc in here
|
||||
|
||||
|
||||
Activate()
|
||||
if(cooldown > 0)
|
||||
return 0
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
Process_cooldown()
|
||||
//Rest of code here
|
||||
return 0
|
||||
|
||||
|
||||
Process_cooldown()
|
||||
cooldown--
|
||||
if(cooldown <= 0) return 0
|
||||
spawn(10)
|
||||
Process_cooldown()
|
||||
return 1
|
||||
|
||||
|
||||
Attach_Holder(var/obj/H, var/mob/user)
|
||||
if(!H) return 0
|
||||
if(!H.IsAssemblyHolder()) return 0
|
||||
//Remember to have it set its loc somewhere in here
|
||||
|
||||
|
||||
*/
|
||||
@@ -16,10 +16,11 @@
|
||||
secured = 0
|
||||
obj/item/device/assembly_left = null
|
||||
obj/item/device/assembly_right = null
|
||||
//The "other" thing will go here
|
||||
obj/assembly_special = null
|
||||
|
||||
proc
|
||||
attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
|
||||
attach_special(var/obj/O, var/mob/user)
|
||||
Process_Activation(var/obj/item/device/D)
|
||||
|
||||
|
||||
@@ -45,6 +46,18 @@
|
||||
return 1
|
||||
|
||||
|
||||
attach_special(var/obj/O, var/mob/user)
|
||||
if(!O) return
|
||||
if(!O.IsSpecialAssembly()) return 0
|
||||
/*
|
||||
if(O:Attach_Holder())
|
||||
assembly_special = O
|
||||
update_icon()
|
||||
src.name = "[assembly_left.name] [assembly_right.name] [assembly_special.name] assembly"
|
||||
*/
|
||||
return
|
||||
|
||||
|
||||
update_icon()
|
||||
src.overlays = null
|
||||
if(assembly_left)
|
||||
@@ -55,9 +68,13 @@
|
||||
src.overlays += assembly_right:small_icon_state_right
|
||||
for(var/O in assembly_right:small_icon_state_overlays)
|
||||
src.overlays += text("[]_r", O)
|
||||
// if(other)
|
||||
// other.update_icon()
|
||||
|
||||
/* if(assembly_special)
|
||||
assembly_special.update_icon()
|
||||
if(assembly_special:small_icon_state)
|
||||
src.overlays += assembly_special:small_icon_state
|
||||
for(var/O in assembly_special:small_icon_state_overlays)
|
||||
src.overlays += O
|
||||
*/
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
@@ -71,28 +88,33 @@
|
||||
|
||||
|
||||
HasProximity(atom/movable/AM as mob|obj)
|
||||
if(!assembly_left || !assembly_right) return 0
|
||||
assembly_left.HasProximity(AM)
|
||||
assembly_right.HasProximity(AM)
|
||||
|
||||
|
||||
Move()//I dont like this but it will do for now
|
||||
var/t = src.dir
|
||||
..()
|
||||
if(istype(assembly_left,/obj/item/device/infra))
|
||||
assembly_left.dir = t
|
||||
del(assembly_left:first)
|
||||
if(istype(assembly_right,/obj/item/device/infra))
|
||||
assembly_right.dir = t
|
||||
del(assembly_right:first)
|
||||
if(assembly_left)
|
||||
assembly_left.HasProximity(AM)
|
||||
if(assembly_right)
|
||||
assembly_right.HasProximity(AM)
|
||||
if(assembly_special)
|
||||
assembly_special.HasProximity(AM)
|
||||
return
|
||||
|
||||
|
||||
attack_hand()//I dont like this one either
|
||||
if(istype(assembly_left,/obj/item/device/infra))
|
||||
del(assembly_left:first)
|
||||
if(istype(assembly_right,/obj/item/device/infra))
|
||||
del(assembly_right:first)
|
||||
Move()
|
||||
..()
|
||||
if(assembly_left)
|
||||
assembly_left:Holder_Movement()
|
||||
if(assembly_right)
|
||||
assembly_right:Holder_Movement()
|
||||
if(assembly_special)
|
||||
assembly_special:Holder_Movement()
|
||||
return
|
||||
|
||||
|
||||
attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
|
||||
if(assembly_left)
|
||||
assembly_left:Holder_Movement()
|
||||
if(assembly_right)
|
||||
assembly_right:Holder_Movement()
|
||||
if(assembly_special)
|
||||
assembly_special:Holder_Movement()
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -100,7 +122,7 @@
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(isscrewdriver(W))
|
||||
if(!assembly_left || !assembly_right)
|
||||
user.show_message("\red Assembly part missing!")
|
||||
user.show_message("\red BUG:Assembly part missing, please report this!")
|
||||
return
|
||||
if(src.secured)
|
||||
src.secured = 0
|
||||
@@ -114,6 +136,8 @@
|
||||
user.show_message("\blue The [src.name] is ready!")
|
||||
update_icon()
|
||||
return
|
||||
else if(W.IsSpecialAssembly())
|
||||
attach_special(W, user)
|
||||
else
|
||||
..()
|
||||
return
|
||||
@@ -149,16 +173,17 @@
|
||||
return
|
||||
|
||||
|
||||
Process_Activation(var/obj/item/device/D)
|
||||
Process_Activation(var/obj/D, var/normal = 1, var/special = 1)
|
||||
if(!D) return 0
|
||||
if(assembly_left == D)
|
||||
assembly_right:Activate()
|
||||
//If anymore things can be on a holder this will have to be edited
|
||||
else if(assembly_right == D)
|
||||
assembly_left:Activate()
|
||||
// else if(assemblyother == D)
|
||||
// assembly_left.Activate()
|
||||
// assembly_right.Activate()
|
||||
if((normal) && (assembly_right) && (assembly_left))
|
||||
if(assembly_right != D)
|
||||
assembly_right:Activate()
|
||||
if(assembly_left != D)
|
||||
assembly_left:Activate()
|
||||
if((special) && (assembly_special))
|
||||
if(!assembly_special == D)
|
||||
assembly_left:Activate()
|
||||
assembly_right:Activate()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -170,4 +195,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
Unsecure()//Code that has to happen when the assembly is taken off of the ready state goes here
|
||||
Attach_Assembly(var/obj/A, var/mob/user)//Called when an assembly is attacked by another
|
||||
Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var
|
||||
Holder_Movement()//Called when the holder is moved
|
||||
beam_trigger()
|
||||
|
||||
|
||||
@@ -146,6 +147,12 @@
|
||||
return
|
||||
|
||||
|
||||
Holder_Movement()
|
||||
if(!holder) return 0
|
||||
src.dir = holder.dir
|
||||
del(src.first)
|
||||
|
||||
|
||||
beam_trigger()
|
||||
if((!secured)||(!scanning)||(cooldown > 0)) return 0
|
||||
if((holder)&&(holder.IsAssemblyHolder()))
|
||||
|
||||
@@ -7,7 +7,6 @@ var/list/commando_names = dd_file2list("config/names/death_commando.txt")
|
||||
var/list/first_names_male = dd_file2list("config/names/first_male.txt")
|
||||
var/list/first_names_female = dd_file2list("config/names/first_female.txt")
|
||||
var/list/last_names = dd_file2list("config/names/last.txt")
|
||||
var/list/loggedsay = dd_file2list("config/names/loggedsay.txt")
|
||||
var/list/clown_names = dd_file2list("config/names/clown.txt")
|
||||
|
||||
var/list/verbs = dd_file2list("config/names/verbs.txt")
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 56 KiB |
@@ -252,7 +252,7 @@
|
||||
"aeR" = (/obj/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/manifold,/turf/simulated/wall/r_wall,/area/prison/cell_block/B)
|
||||
"aeS" = (/obj/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/manifold{dir = 1},/turf/simulated/wall/r_wall,/area/prison/rec_room)
|
||||
"aeT" = (/obj/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple{dir = 4},/turf/simulated/wall/r_wall,/area/prison/rec_room)
|
||||
"aeU" = (/obj/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/manifold,/obj/window/reinforced{dir = 8},/obj/window/reinforced{dir = 1},/obj/window/reinforced{dir = 4},/obj/window/reinforced,/obj/grille,/turf/simulated/floor/plating,/area/prison/rec_room)
|
||||
"aeU" = (/obj/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/manifold,/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{name = "Prison Observation Room"; req_access_txt = "1"},/turf/simulated/floor,/area/prison/rec_room)
|
||||
"aeV" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{name = "Prison Observation Room"; req_access_txt = "1"},/obj/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple,/obj/machinery/atmospherics/pipe/simple{dir = 4},/turf/simulated/floor,/area/prison/rec_room)
|
||||
"aeW" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{name = "Prison Rec Room"; req_access_txt = "1"},/obj/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple{dir = 4},/turf/simulated/floor,/area/prison/rec_room)
|
||||
"aeX" = (/obj/disposalpipe/junction{dir = 4; icon_state = "pipe-j2"},/obj/machinery/atmospherics/pipe/simple{dir = 4},/turf/simulated/wall/r_wall,/area/prison/rec_room)
|
||||
@@ -5747,7 +5747,7 @@
|
||||
"cgA" = (/obj/landmark/start,/turf/space,/area)
|
||||
"cgB" = (/turf/unsimulated/wall{icon = 'icons/misc/fullscreen.dmi'; icon_state = "title"; name = "Space Station 13"},/area)
|
||||
"cgC" = (/turf/space,/turf/simulated/shuttle/wall{dir = 8; icon_state = "diagonalWall3"},/area/syndicate_mothership)
|
||||
"cgD" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/syndicate_mothership)
|
||||
"cgD" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/syndicate_mothership)
|
||||
"cgE" = (/turf/simulated/shuttle/wall{icon_state = "wall3"},/area/syndicate_mothership)
|
||||
"cgF" = (/turf/space,/turf/simulated/shuttle/wall{dir = 8; icon_state = "diagonalWall3"},/area/shuttle/syndicate_elite/mothership)
|
||||
"cgG" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_r (NORTH)"; icon_state = "propulsion_r"; dir = 1},/turf/space,/area/shuttle/syndicate_elite/mothership)
|
||||
@@ -5819,8 +5819,8 @@
|
||||
"chU" = (/obj/table,/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start)
|
||||
"chV" = (/turf/unsimulated/wall,/area/centcom)
|
||||
"chW" = (/obj/landmark{name = "Nuclear-Closet"},/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start)
|
||||
"chX" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "External Airlock"},/area)
|
||||
"chY" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom)
|
||||
"chX" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "External Airlock"},/area)
|
||||
"chY" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom)
|
||||
"chZ" = (/turf/unsimulated/floor{tag = "icon-warnplate (WEST)"; icon_state = "warnplate"; dir = 8},/area/centcom)
|
||||
"cia" = (/turf/unsimulated/floor{name = "plating"},/area/centcom)
|
||||
"cib" = (/obj/stool/chair{dir = 4},/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start)
|
||||
@@ -5880,7 +5880,7 @@
|
||||
"cjd" = (/turf/unsimulated/floor{tag = "icon-warnplate (WEST)"; icon_state = "warnplate"; dir = 8},/area/centcom/suppy)
|
||||
"cje" = (/turf/unsimulated/floor{name = "plating"},/area/centcom/suppy)
|
||||
"cjf" = (/turf/unsimulated/floor{tag = "icon-warnplate (EAST)"; icon_state = "warnplate"; dir = 4},/area/centcom/suppy)
|
||||
"cjg" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/suppy)
|
||||
"cjg" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/suppy)
|
||||
"cjh" = (/obj/machinery/sleeper{icon_state = "sleeper_0-r"; orient = "RIGHT"},/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start)
|
||||
"cji" = (/obj/landmark{name = "Syndicate-Spawn"},/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start)
|
||||
"cjj" = (/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start)
|
||||
@@ -5898,7 +5898,7 @@
|
||||
"cjv" = (/obj/table,/obj/machinery/juicer{pixel_y = 6},/turf/unsimulated/floor{tag = "icon-redyellowfull"; icon_state = "redyellowfull"},/area/centcom/living)
|
||||
"cjw" = (/obj/machinery/door/airlock/external,/turf/unsimulated/floor{name = "plating"},/area/centcom/living)
|
||||
"cjx" = (/turf/unsimulated/floor{name = "plating"},/area/centcom/living)
|
||||
"cjy" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/living)
|
||||
"cjy" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/living)
|
||||
"cjz" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s6"; icon_state = "swall_s6"; dir = 2},/area/supply/dock)
|
||||
"cjA" = (/turf/simulated/shuttle/wall{tag = "icon-swall12"; icon_state = "swall12"; dir = 2},/area/supply/dock)
|
||||
"cjB" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s10"; icon_state = "swall_s10"; dir = 2},/area/supply/dock)
|
||||
@@ -6278,7 +6278,7 @@
|
||||
"cqL" = (/turf/simulated/shuttle/floor,/area/shuttle/escape/centcom)
|
||||
"cqM" = (/obj/stool/chair{dir = 4},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom)
|
||||
"cqN" = (/obj/machinery/computer/security,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom)
|
||||
"cqO" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/ferry)
|
||||
"cqO" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/ferry)
|
||||
"cqP" = (/turf/unsimulated/floor{tag = "icon-warnplate (WEST)"; icon_state = "warnplate"; dir = 8},/area/centcom/ferry)
|
||||
"cqQ" = (/turf/unsimulated/floor{name = "plating"},/area/centcom/ferry)
|
||||
"cqR" = (/obj/grille,/obj/window/reinforced{dir = 8},/obj/window/reinforced,/obj/window/reinforced{dir = 1},/obj/window/reinforced{dir = 4},/turf/unsimulated/floor{name = "plating"},/area/centcom/ferry)
|
||||
@@ -6288,7 +6288,7 @@
|
||||
"cqV" = (/obj/stool/chair{dir = 8},/turf/unsimulated/floor{icon_state = "green"; dir = 4},/area/centcom/control)
|
||||
"cqW" = (/obj/machinery/computer/crew,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom)
|
||||
"cqX" = (/obj/machinery/computer/communications,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom)
|
||||
"cqY" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/turf/simulated/shuttle/wall{dir = 1; icon_state = "diagonalWall3"},/area/centcom/ferry)
|
||||
"cqY" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/turf/simulated/shuttle/wall{dir = 1; icon_state = "diagonalWall3"},/area/centcom/ferry)
|
||||
"cqZ" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s6"; icon_state = "swall_s6"; dir = 2},/area/shuttle/transport1/centcom)
|
||||
"cra" = (/turf/simulated/shuttle/wall{tag = "icon-swall12"; icon_state = "swall12"; dir = 2},/area/shuttle/transport1/centcom)
|
||||
"crb" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s10"; icon_state = "swall_s10"; dir = 2},/area/shuttle/transport1/centcom)
|
||||
|
||||
@@ -365,6 +365,7 @@
|
||||
#include "code\game\gamemodes\sandbox\h_sandbox.dm"
|
||||
#include "code\game\gamemodes\sandbox\sandbox.dm"
|
||||
#include "code\game\gamemodes\traitor\traitor.dm"
|
||||
#include "code\game\gamemodes\wizard\spellbook.dm"
|
||||
#include "code\game\gamemodes\wizard\spells.dm"
|
||||
#include "code\game\gamemodes\wizard\wizard.dm"
|
||||
#include "code\game\jobs\access.dm"
|
||||
|
||||
Reference in New Issue
Block a user