Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tgstation/-tg-station
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheridan committed Apr 21, 2013
2 parents 471f650 + 6c4367d commit 1317ea6
Show file tree
Hide file tree
Showing 36 changed files with 5,358 additions and 5,450 deletions.
5 changes: 3 additions & 2 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var/global/list/chemical_reagents_list //list of all /datum/reagent datums in
var/global/list/landmarks_list = list() //list of all landmarks created
var/global/list/surgeries_list = list() //list of all surgeries by name, associated with their path.
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
var/global/list/shuttle_caller_list = list() //list of all communication consoles and AIs, for automatic shuttle calls when there are none.

var/global/list/portals = list() //for use by portals

Expand Down Expand Up @@ -44,8 +45,8 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel")
//facial hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, facial_hair_styles_list, facial_hair_styles_male_list, facial_hair_styles_female_list)
//underwear
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, underwear_all, underwear_m, underwear_f)
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, underwear_all, underwear_m, underwear_f)

//Surgeries
for(var/path in typesof(/datum/surgery))
if(path == /datum/surgery)
Expand Down
27 changes: 27 additions & 0 deletions code/controllers/shuttle_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ datum/shuttle_controller
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= 600)
online = 0
direction = 1
endtime = null
return
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
Expand Down Expand Up @@ -76,6 +79,30 @@ datum/shuttle_controller
endtime = world.timeofday + (SHUTTLEARRIVETIME*10 - ticksleft)
return

//calls the shuttle if there's no AI or comms console,
proc/autoshuttlecall()
var/callshuttle = 1
for(var/SC in shuttle_caller_list)
if(istype(SC,/mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = SC
if(AI.stat && !AI.client)
continue
var/turf/T = get_turf(SC)
if(T && T.z == 1)
callshuttle = 0 //if there's an alive AI or a communication console on the station z level, we don't call the shuttle
break

if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction")
callshuttle = 0

if(callshuttle)
if(!online && direction == 1) //we don't call the shuttle if it's already coming
incall(2.5) //25 minutes! If they want to recall, they have 20 minutes to do so
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')

proc/process()

emergency_shuttle
Expand Down
15 changes: 0 additions & 15 deletions code/defines/obj/weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,21 +390,6 @@
icon_state = "wood_tableparts"
flags = null

/obj/item/weapon/wire
desc = "This is just a simple piece of regular insulated wire."
name = "wire"
icon = 'icons/obj/power.dmi'
icon_state = "item_wire"
var/amount = 1.0
var/laying = 0.0
var/old_lay = null
m_amt = 40
attack_verb = list("whipped", "lashed", "disciplined", "tickled")

suicide_act(mob/user)
viewers(user) << "\red <b>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</b>"
return (OXYLOSS)

/obj/item/weapon/module
icon = 'icons/obj/module.dmi'
icon_state = "std_module"
Expand Down
51 changes: 5 additions & 46 deletions code/game/machinery/computer/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
var/stat_msg2


/obj/machinery/computer/communications/New()
shuttle_caller_list += src
..()

/obj/machinery/computer/communications/process()
if(..())
Expand Down Expand Up @@ -498,51 +501,7 @@


/obj/machinery/computer/communications/Del()

for(var/obj/machinery/computer/communications/commconsole in world)
if(istype(commconsole.loc,/turf) && commconsole != src)
return ..()

for(var/obj/item/weapon/circuitboard/communications/commboard in world)
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
return ..()

for(var/mob/living/silicon/ai/shuttlecaller in player_list)
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
return ..()

if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" /* DEATH SQUADS || sent_strike_team*/)
return ..()

emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')

shuttle_caller_list -= src
emergency_shuttle.autoshuttlecall()
..()

/obj/item/weapon/circuitboard/communications/Del()

for(var/obj/machinery/computer/communications/commconsole in world)
if(istype(commconsole.loc,/turf))
return ..()

for(var/obj/item/weapon/circuitboard/communications/commboard in world)
if((istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) && commboard != src)
return ..()

for(var/mob/living/silicon/ai/shuttlecaller in player_list)
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
return ..()

if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" /* DEATH SQUADS || sent_strike_team*/)
return ..()

emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')

..()
4 changes: 4 additions & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,10 @@ About the new airlock wires panel:
if(5) new/obj/structure/door_assembly/door_assembly_mai( src.loc )
if(6) new/obj/structure/door_assembly/door_assembly_ext( src.loc )
if(7) new/obj/structure/door_assembly/door_assembly_glass( src.loc )
//8 is centcomm
if(9) new/obj/structure/door_assembly/door_assembly_vault(loc)
//10 is double glass door (2x1)
//11 is freezer
if(12) new/obj/structure/door_assembly/door_assembly_hatch( src.loc )
if(13) new/obj/structure/door_assembly/door_assembly_mhatch( src.loc )
if(14) new/obj/structure/door_assembly/door_assembly_com/glass( src.loc )
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/kitchen/processor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
return
for(var/i = 1, i <= C, i++)
new S.coretype(loc)
feedback_add_details("slime_core_harvested","[S.colour]")
feedback_add_details("slime_core_harvested","[replacetext(S.colour," ","_")]")
..()
input = /mob/living/carbon/slime
output = null
Expand Down
21 changes: 10 additions & 11 deletions code/game/objects/effects/decals/contraband.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var/obj/structure/sign/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor


/obj/item/weapon/contraband/poster/New(turf/loc, var/given_serial = 0)
/obj/item/weapon/contraband/poster/New(turf/loc, given_serial = 0)
if(given_serial == 0)
serial_number = rand(1, NUM_OF_POSTER_DESIGNS)
resulting_poster = new(serial_number)
Expand Down Expand Up @@ -74,8 +74,7 @@ obj/structure/sign/poster
var/ruined = 0


obj/structure/sign/poster/New(var/serial)

obj/structure/sign/poster/New(serial)
serial_number = serial

if(serial_number == loc)
Expand Down Expand Up @@ -119,8 +118,8 @@ obj/structure/sign/poster/New(var/serial)
desc = "Why are you still here?"
..()

obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wirecutters))
obj/structure/sign/poster/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/wirecutters))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
if(ruined)
user << "<span class='notice'>You remove the remnants of the poster.</span>"
Expand All @@ -131,7 +130,7 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
return


/obj/structure/sign/poster/attack_hand(mob/user as mob)
/obj/structure/sign/poster/attack_hand(mob/user)
if(ruined)
return
var/temp_loc = user.loc
Expand All @@ -149,15 +148,15 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if("No")
return

/obj/structure/sign/poster/proc/roll_and_drop(turf/loc)
/obj/structure/sign/poster/proc/roll_and_drop(turf/location)
var/obj/item/weapon/contraband/poster/P = new(src, serial_number)
P.resulting_poster = src
P.loc = loc
P.loc = location
loc = P


//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
/turf/simulated/wall/proc/place_poster(var/obj/item/weapon/contraband/poster/P, var/mob/user)
/turf/simulated/wall/proc/place_poster(obj/item/weapon/contraband/poster/P, mob/user)
if(!P.resulting_poster) return

var/stuff_on_wall = 0
Expand All @@ -170,7 +169,7 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "<span class='notice'>The wall is far too cluttered to place a poster!</span>"
return

user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.
user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.

//declaring D because otherwise if P gets 'deconstructed' we lose our reference to P.resulting_poster
var/obj/structure/sign/poster/D = P.resulting_poster
Expand All @@ -184,7 +183,7 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
sleep(17)
if(!D) return

if(istype(src,/turf/simulated/wall) && user && user.loc == temp_loc)//Let's check if everything is still there
if(istype(src,/turf/simulated/wall) && user && user.loc == temp_loc) //Let's check if everything is still there
user << "<span class='notice'>You place the poster!</span>"
else
D.roll_and_drop(temp_loc)
Expand Down
Loading

0 comments on commit 1317ea6

Please sign in to comment.