mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
-Syndies should spawn next to their sleepers and not ontop of eachother.
-equip_to_appropriate_slot will now return whether it's successful or not. -Fixed the receivers and broadcasters being the wrong preset. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4250 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -109,39 +109,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/game_mode/nuclear/post_setup()
|
||||
var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn")
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
var/obj/effect/landmark/closet_spawn = locate("landmark*Nuclear-Closet")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
var/leader_selected = 0
|
||||
var/agent_number = 1
|
||||
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
synd_mind.current.loc = get_turf(synd_spawn)
|
||||
|
||||
forge_syndicate_objectives(synd_mind)
|
||||
greet_syndicate(synd_mind)
|
||||
|
||||
|
||||
if(!leader_selected)
|
||||
prepare_syndicate_leader(synd_mind, nuke_code)
|
||||
leader_selected = 1
|
||||
else
|
||||
synd_mind.current.real_name = "[syndicate_name()] Operative #[agent_number]"
|
||||
agent_number++
|
||||
|
||||
equip_syndicate(synd_mind.current)
|
||||
update_synd_icons_added(synd_mind)
|
||||
|
||||
update_all_synd_icons()
|
||||
|
||||
if(nuke_spawn)
|
||||
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
|
||||
the_bomb.r_code = nuke_code
|
||||
|
||||
if(closet_spawn)
|
||||
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
|
||||
var/list/turf/synd_spawn = list()
|
||||
|
||||
for (var/obj/effect/landmark/A in world)
|
||||
if (A.name == "Syndicate-Gear-Closet")
|
||||
@@ -154,6 +123,45 @@
|
||||
del(A)
|
||||
continue
|
||||
|
||||
if(A.name == "Syndicate-Spawn")
|
||||
synd_spawn += get_turf(A)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
var/obj/effect/landmark/closet_spawn = locate("landmark*Nuclear-Closet")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
var/leader_selected = 0
|
||||
var/agent_number = 1
|
||||
var/spawnpos = agent_number
|
||||
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
spawnpos = (agent_number >= synd_spawn.len ? 1 : spawnpos + 1)
|
||||
synd_mind.current.loc = synd_spawn[spawnpos]
|
||||
|
||||
forge_syndicate_objectives(synd_mind)
|
||||
greet_syndicate(synd_mind)
|
||||
equip_syndicate(synd_mind.current)
|
||||
|
||||
if(!leader_selected)
|
||||
prepare_syndicate_leader(synd_mind, nuke_code)
|
||||
leader_selected = 1
|
||||
else
|
||||
synd_mind.current.real_name = "[syndicate_name()] Operative #[agent_number]"
|
||||
agent_number++
|
||||
|
||||
update_synd_icons_added(synd_mind)
|
||||
|
||||
update_all_synd_icons()
|
||||
|
||||
if(nuke_spawn && synd_spawn.len > 0)
|
||||
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
|
||||
the_bomb.r_code = nuke_code
|
||||
|
||||
if(closet_spawn)
|
||||
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
|
||||
@@ -175,19 +183,11 @@
|
||||
P.loc = synd_mind.current.loc
|
||||
else
|
||||
var/mob/living/carbon/human/H = synd_mind.current
|
||||
var/list/slots = list (
|
||||
"backpack" = H.slot_in_backpack,
|
||||
"left pocket" = H.slot_l_store,
|
||||
"right pocket" = H.slot_r_store,
|
||||
"left hand" = H.slot_l_hand,
|
||||
"right hand" = H.slot_r_hand,
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(P, slots, del_on_fail=0)
|
||||
if (!where)
|
||||
P.loc = H.loc
|
||||
H.equip_if_possible(P, H.slot_r_store, 0)
|
||||
|
||||
else
|
||||
nuke_code = "code will be proveded later"
|
||||
nuke_code = "code will be provided later"
|
||||
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
|
||||
|
||||
|
||||
@@ -29,9 +29,10 @@
|
||||
return null
|
||||
|
||||
//puts the item "W" into an appropriate slot in a human's inventory
|
||||
//returns 0 if it cannot, 1 if successful
|
||||
/mob/living/carbon/human/proc/equip_to_appropriate_slot(obj/item/W)
|
||||
if(!W) return
|
||||
if(!ishuman(src)) return
|
||||
if(!W) return 0
|
||||
if(!ishuman(src)) return 0
|
||||
|
||||
if(W.slot_flags & SLOT_BACK)
|
||||
if(!back)
|
||||
@@ -39,7 +40,7 @@
|
||||
u_equip(W)
|
||||
back = W
|
||||
update_inv_back()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_ID)
|
||||
if(!wear_id && w_uniform)
|
||||
@@ -47,7 +48,7 @@
|
||||
u_equip(W)
|
||||
wear_id = W
|
||||
update_inv_wear_id()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_ICLOTHING)
|
||||
if(!w_uniform)
|
||||
@@ -55,7 +56,7 @@
|
||||
u_equip(W)
|
||||
w_uniform = W
|
||||
update_inv_w_uniform()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_OCLOTHING)
|
||||
if(!wear_suit)
|
||||
@@ -63,7 +64,7 @@
|
||||
u_equip(W)
|
||||
wear_suit = W
|
||||
update_inv_wear_suit()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_MASK)
|
||||
if(!wear_mask)
|
||||
@@ -71,7 +72,7 @@
|
||||
u_equip(W)
|
||||
wear_mask = W
|
||||
update_inv_wear_mask()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_HEAD)
|
||||
if(!head)
|
||||
@@ -79,7 +80,7 @@
|
||||
u_equip(W)
|
||||
head = W
|
||||
update_inv_head()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_FEET)
|
||||
if(!shoes)
|
||||
@@ -87,7 +88,7 @@
|
||||
u_equip(W)
|
||||
shoes = W
|
||||
update_inv_shoes()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_GLOVES)
|
||||
if(!gloves)
|
||||
@@ -95,7 +96,7 @@
|
||||
u_equip(W)
|
||||
gloves = W
|
||||
update_inv_gloves()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_EARS)
|
||||
if(!ears)
|
||||
@@ -103,7 +104,7 @@
|
||||
u_equip(W)
|
||||
ears = W
|
||||
update_inv_ears()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_EYES)
|
||||
if(!glasses)
|
||||
@@ -111,7 +112,7 @@
|
||||
u_equip(W)
|
||||
glasses = W
|
||||
update_inv_glasses()
|
||||
return
|
||||
return 1
|
||||
|
||||
if(W.slot_flags & SLOT_BELT)
|
||||
if(!belt && w_uniform)
|
||||
@@ -119,7 +120,7 @@
|
||||
u_equip(W)
|
||||
belt = W
|
||||
update_inv_belt()
|
||||
return
|
||||
return 1
|
||||
|
||||
//Suit storage
|
||||
var/confirm
|
||||
@@ -133,7 +134,7 @@
|
||||
u_equip(W)
|
||||
s_store = W
|
||||
update_inv_s_store()
|
||||
return
|
||||
return 1
|
||||
|
||||
//Pockets
|
||||
if ( !( W.slot_flags & SLOT_DENYPOCKET ) )
|
||||
@@ -142,22 +143,25 @@
|
||||
u_equip(W)
|
||||
l_store = W
|
||||
update_inv_pockets()
|
||||
return
|
||||
return 1
|
||||
if(!r_store)
|
||||
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
|
||||
u_equip(W)
|
||||
r_store = W
|
||||
update_inv_pockets()
|
||||
return
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/equip_if_possible(obj/item/W, slot, del_on_fail = 1) // since byond doesn't seem to have pointers, this seems like the best way to do this :/
|
||||
//warning: icky code
|
||||
var/equipped = 0
|
||||
if((slot == l_store || slot == r_store || slot == belt || slot == wear_id) && !src.w_uniform)
|
||||
if(del_on_fail)
|
||||
del(W)
|
||||
return
|
||||
if(slot == s_store && !src.wear_suit)
|
||||
if(del_on_fail)
|
||||
del(W)
|
||||
return
|
||||
switch(slot)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user