•Adding my stuff so I can work from my parents' computer

Happy easter to everyone. Fucking love you guys

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3412 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
polyxenitopalidou@gmail.com
2012-04-08 09:22:07 +00:00
parent e428ac19ec
commit 45efc957a8
13 changed files with 2107 additions and 3 deletions
+2 -2
View File
@@ -229,7 +229,7 @@
del(src)*/
/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
desc = "The Maltese Falcon, Space Bar and Grill. Now with added monkey."
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'decals.dmi'
icon_state = "maltesefalcon1"
@@ -238,7 +238,7 @@
density = 0
/obj/effect/sign/maltesefalcon2
desc = "The Maltese Falcon, Space Bar and Grill. Now with added monkey."
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'decals.dmi'
icon_state = "maltesefalcon2"
+1 -1
View File
@@ -584,7 +584,7 @@
/obj/item/weapon/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
name = "fire axe"
desc = "Let me axe you a question."
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 5
w_class = 4.0
flags = ONBACK
+177
View File
@@ -0,0 +1,177 @@
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
#define NUM_OF_POSTER_DESIGNS 17
/obj/item/weapon/contraband
name = "Contraband Item"
desc = "You probably shouldn't be holding this."
icon = 'contraband.dmi'
force = 5
/obj/item/weapon/contraband/poster
name = "Rolled poster"
desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface. Its vulgar themes have marked it as Contraband aboard Nanotrasen© Space Facilities."
icon_state = "rolled_poster"
var/serial_number = 0
var/obj/effect/decal/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)
if(given_serial==0)
//world<<"HERP"
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
src.resulting_poster = new(serial_number)
else
//world<<"DERP"
serial_number = given_serial
//We don't give it a resulting_poster because if we called it with a given_serial it means that we're rerolling an already used poster.
src.name += " - No. [serial_number]"
..(loc)
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
if(src.resulting_poster)
src.resulting_poster.add_fingerprint(user)
..()*/
/*/obj/item/weapon/contraband/poster/attack(atom/A, mob/user as mob) //This shit is handled through the wall's attackby()
if (istype(A, /turf/simulated/wall))
if(src.resulting_poster == null)
return
else
var/turf/simulated/wall/W = A
var/check = 0
var/stuff_on_wall = 0
for( var/obj/O in W.contents) //Let's see if it already has a poster on it or too much stuff
if(istype(O,/obj/effect/decal/poster))
check = 1
break
stuff_on_wall++
if(stuff_on_wall==3)
check = 1
break
if(check)
user << "<FONT COLOR='RED'>The wall is far too cluttered to place a poster!</FONT>"
return
src.resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
W.contents += src.resulting_poster
del(src)*/
//############################## THE ACTUAL DECALS ###########################
obj/effect/decal/poster
name = "Poster"
desc = "A large piece of space-resistant printed paper. It's considered contraband."
icon = 'contraband.dmi'
anchored = 1
var/serial_number //Will hold the value of src.loc if nobody initialises it
var/ruined = 0
obj/effect/decal/poster/New(var/serial)
src.serial_number = serial
if(serial_number==src.loc){serial_number = rand(1,NUM_OF_POSTER_DESIGNS);} //This is for the mappers that want individual posters without having to use rolled posters.
icon_state = "poster[serial_number]"
switch(serial_number)
if(1)
name += " - Unlucky Space Explorer"
desc += " This particular one depicts a skeletal form within a space suit."
if(2)
name += " - Positronic Logic Conflicts"
desc += " This particular one depicts the cold, unmoving stare of a particular advanced AI."
if(3)
name += " - Paranoia"
desc += " This particular one warns of the dangers of trusting your co-workers too much."
if(4)
name += " - Keep Calm"
desc += " This particular one is of a famous New Earth design, although a bit modified."
if(5)
name += " - Martian Warlord"
desc += " This particular one depicts the cartoony mug of a certain Martial Warmonger."
if(6)
name += " - Technological Singularity"
desc += " This particular one is of the blood-curdling symbol of a long-since defeated enemy of humanity."
if(7)
name += " - Wasteland"
desc += " This particular one is of a couple of ragged gunmen, one male and one female, on top of a mound of rubble. The number \"13\" is visible on their blue jumpsuits."
if(8)
name += " - Pinup Girl Cindy"
desc += " This particular one is of Nanotrasen's PR girl, Cindy, in a particularly feminine pose."
if(9)
name += " - Pinup Girl Amy"
desc += " This particular one is of Amy, the nymphomaniac Urban Legend of Nanotrasen Space Stations. How this photograph came to be is not known."
if(10)
name += " - Don't Panic"
desc += " This particular one depicts some sort of star in a grimace. The \"Don't Panic\" is written in big, friendly letters."
if(11)
name += " - Underwater Laboratory"
desc += " This particular one is of the fabled last crew of Nanotrasen's previous project before going big on Asteroid mining, Sealab."
if(12)
name += " - Missing Gloves"
desc += " This particular one is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
if(13)
name += " - Rogue AI"
desc += " This particular one depicts the shell of the infamous AI that catastropically comandeered one of Nanotrasen's earliest space stations. Back then, the corporation was just known as TriOptimum."
if(14)
name += " - User of the Arcane Arts"
desc += " This particular one depicts a wizard, casting a spell. You can't really make out if it's an actial photograph or a computer-generated image."
if(15)
name += " - Leviating Skull"
desc += " This particular one is the portrait of a certain flying, friendly and somewhat sex-crazed enchanted skull. Its adventures along with its fabled companion are now fading through history..."
if(17)
name += " - Augmented Legend"
desc += " This particular one is of an obviously augmented individual, gazing towards the sky. The cyber-city in the backround is rather punkish."
if(18)
name += " - Dangerous Static"
desc += " This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, urging you to \"tear this poster in half to receive your free sample\"."
else
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
desc = "Why are you still here?"
..()
obj/effect/decal/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/wirecutters) )
playsound(src.loc, 'Wirecutter.ogg', 100, 1)
if(src.ruined)
user << "<FONT COLOR='BLUE'>You remove the remnants of the poster.</FONT>"
del(src)
else
user << "<FONT COLOR='BLUE'>You carefully remove the poster from the wall.</FONT>"
var/obj/item/weapon/contraband/poster/P = new(src,src.serial_number)
P.resulting_poster = src
P.loc = user.loc
src.loc = P
return
/obj/effect/decal/poster/attack_hand(mob/user as mob)
if(src.ruined)
return
var/temp_loc = user.loc
switch(alert("Do I want to rip the poster from the wall?","You think...","Yes","No"))
if("Yes")
if(user.loc != temp_loc)
return
for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] rips the [src.name] in a single, decisive motion!" )
playsound(src.loc, 'poster_ripped.ogg', 100, 1)
src.ruined = 1
src.icon_state = "poster_ripped"
src.name = "Ripped poster"
src.desc = "You can't make out anything from the poster's original print. It's ruined."
src.add_fingerprint(user)
if("No")
return
+165
View File
@@ -0,0 +1,165 @@
/obj/vehicle/airtight
//inner atmos
var/use_internal_tank = 0
var/internal_tank_valve = ONE_ATMOSPHERE
var/obj/machinery/portable_atmospherics/canister/internal_tank
var/datum/gas_mixture/cabin_air
var/obj/machinery/atmospherics/portables_connector/connected_port = null
var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature
var/datum/global_iterator/pr_give_air //moves air from tank to cabin
/obj/vehicle/airtight/New()
..()
src.add_airtank()
src.add_cabin()
src.add_airtight_iterators()
//######################################### Helpers for airtight vehicles #########################################
/obj/vehicle/airtight/proc/add_cabin()
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
return cabin_air
/obj/vehicle/airtight/proc/add_airtank()
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank
/obj/vehicle/airtight/proc/add_airtight_iterators()
pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src))
pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src))
//######################################### Specific datums for airtight vehicles #################################
/datum/global_iterator/vehicle_preserve_temp //normalizing cabin air temperature to 20 degrees celsium
delay = 20
process(var/obj/vehicle/airtight/V)
if(V.cabin_air && V.cabin_air.return_volume() > 0)
var/delta = V.cabin_air.temperature - T20C
V.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
return
/datum/global_iterator/vehicle_tank_give_air
delay = 15
process(var/obj/vehicle/airtight/V)
if(V.internal_tank)
var/datum/gas_mixture/tank_air = V.internal_tank.return_air()
var/datum/gas_mixture/cabin_air = V.cabin_air
var/release_pressure = V.internal_tank_valve
var/cabin_pressure = cabin_air.return_pressure()
var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2)
var/transfer_moles = 0
if(pressure_delta > 0) //cabin pressure lower than release pressure
if(tank_air.return_temperature() > 0)
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = tank_air.remove(transfer_moles)
cabin_air.merge(removed)
else if(pressure_delta < 0) //cabin pressure higher than release pressure
var/datum/gas_mixture/t_air = V.get_turf_air()
pressure_delta = cabin_pressure - release_pressure
if(t_air)
pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta)
if(pressure_delta > 0) //if location pressure is lower than cabin pressure
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles)
if(t_air)
t_air.merge(removed)
else //just delete the cabin gas, we're in space or some shit
del(removed)
else
return stop()
return
//######################################### Atmospherics for vehicles #############################################
/obj/vehicle/proc/get_turf_air()
var/turf/T = get_turf(src)
if(T)
. = T.return_air()
return
/obj/vehicle/airtight/remove_air(amount)
if(use_internal_tank)
return cabin_air.remove(amount)
else
var/turf/T = get_turf(src)
if(T)
return T.remove_air(amount)
return
/obj/vehicle/airtight/return_air()
if(use_internal_tank)
return cabin_air
return get_turf_air()
/obj/vehicle/airtight/proc/return_pressure()
. = 0
if(use_internal_tank)
. = cabin_air.return_pressure()
else
var/datum/gas_mixture/t_air = get_turf_air()
if(t_air)
. = t_air.return_pressure()
return
/obj/vehicle/airtight/proc/return_temperature()
. = 0
if(use_internal_tank)
. = cabin_air.return_temperature()
else
var/datum/gas_mixture/t_air = get_turf_air()
if(t_air)
. = t_air.return_temperature()
return
/obj/vehicle/airtight/proc/connect(obj/machinery/atmospherics/portables_connector/new_port)
//Make sure not already connected to something else
if(connected_port || !new_port || new_port.connected_device)
return 0
//Make sure are close enough for a valid connection
if(new_port.loc != src.loc)
return 0
//Perform the connection
connected_port = new_port
connected_port.connected_device = src
//Actually enforce the air sharing
var/datum/pipe_network/network = connected_port.return_network(src)
if(network && !(internal_tank.return_air() in network.gases))
network.gases += internal_tank.return_air()
network.update = 1
log_message("Vehicle airtank connected to external port.")
return 1
/obj/vehicle/airtight/proc/disconnect()
if(!connected_port)
return 0
var/datum/pipe_network/network = connected_port.return_network(src)
if(network)
network.gases -= internal_tank.return_air()
connected_port.connected_device = null
connected_port = null
src.log_message("Vehicle airtank disconnected from external port.")
return 1
View File
+190
View File
@@ -0,0 +1,190 @@
/obj/vehicle
name = "Vehicle"
icon = 'vehicles.dmi'
density = 1
anchored = 1
unacidable = 1 //To avoid the pilot-deleting shit that came with mechas
layer = MOB_LAYER
//var/can_move = 1
var/mob/living/carbon/occupant = null
//var/step_in = 10 //make a step in step_in/10 sec.
//var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
//var/step_energy_drain = 10
var/health = 300 //health is health
//var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
//the values in this list show how much damage will pass through, not how much will be absorbed.
var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
var/obj/item/weapon/cell/cell //Our power source
var/state = 0
var/list/log = new
var/last_message = 0
var/add_req_access = 1
var/maint_access = 1
//var/dna //dna-locking the mech
var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference
var/datum/effect/effect/system/spark_spread/spark_system = new
var/lights = 0
var/lights_power = 6
//inner atmos //These go in airtight.dm, not all vehicles are space-faring -Agouri
//var/use_internal_tank = 0
//var/internal_tank_valve = ONE_ATMOSPHERE
//var/obj/machinery/portable_atmospherics/canister/internal_tank
//var/datum/gas_mixture/cabin_air
//var/obj/machinery/atmospherics/portables_connector/connected_port = null
var/obj/item/device/radio/radio = null
var/max_temperature = 2500
//var/internal_damage_threshold = 50 //health percentage below which internal damage is possible
var/internal_damage = 0 //contains bitflags
var/list/operation_req_access = list()//required access level for mecha operation
var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment
//var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature //In airtight.dm you go -Agouri
var/datum/global_iterator/pr_inertial_movement //controls intertial movement in spesss
//var/datum/global_iterator/pr_give_air //moves air from tank to cabin //Y-you too -Agouri
var/datum/global_iterator/pr_internal_damage //processes internal damage
var/wreckage
var/list/equipment = new
var/obj/selected
//var/max_equip = 3
var/datum/events/events
/obj/vehicle/New()
..()
events = new
icon_state += "-unmanned"
add_radio()
//add_cabin() //No cabin for non-airtights
spark_system.set_up(2, 0, src)
spark_system.attach(src)
add_cell()
add_iterators()
removeVerb(/obj/mecha/verb/disconnect_from_port)
removeVerb(/atom/movable/verb/pull)
log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.")
loc.Entered(src)
return
//################ Helpers ###########################################################
/obj/vehicle/proc/removeVerb(verb_path)
verbs -= verb_path
/obj/vehicle/proc/addVerb(verb_path)
verbs += verb_path
/*/obj/vehicle/proc/add_airtank() //In airtight.dm -Agouri
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank*/
/obj/vehicle/proc/add_cell(var/obj/item/weapon/cell/C=null)
if(C)
C.forceMove(src)
cell = C
return
cell = new(src)
cell.charge = 15000
cell.maxcharge = 15000
/*/obj/vehicle/proc/add_cabin() //In airtight.dm -Agouri
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
return cabin_air*/
/obj/vehicle/proc/add_radio()
radio = new(src)
radio.name = "[src] radio"
radio.icon = icon
radio.icon_state = icon_state
radio.subspace_transmission = 1
/obj/vehicle/proc/add_iterators()
pr_inertial_movement = new /datum/global_iterator/vehicle_intertial_movement(null,0)
//pr_internal_damage = new /datum/global_iterator/vehicle_internal_damage(list(src),0)
//pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) //In airtight.dm's add_airtight_iterators -Agouri
//pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src) //Same here -Agouri
/obj/vehicle/proc/check_for_support()
if(locate(/obj/structure/grille, orange(1, src)) || locate(/obj/structure/lattice, orange(1, src)) || locate(/turf/simulated, orange(1, src)) || locate(/turf/unsimulated, orange(1, src)))
return 1
else
return 0
//################ Logs and messages ############################################
/obj/vehicle/proc/log_message(message as text,red=null)
log.len++
log[log.len] = list("time"=world.timeofday,"message"="[red?"<font color='red'>":null][message][red?"</font>":null]")
return log.len
//################ Global Iterator Datums ######################################
/datum/global_iterator/vehicle_intertial_movement //inertial movement in space
delay = 7
process(var/obj/vehicle/V as obj, direction)
if(direction)
if(!step(V, direction)||V.check_for_support())
src.stop()
else
src.stop()
return
/datum/global_iterator/mecha_internal_damage // processing internal damage
process(var/obj/mecha/mecha)
if(!mecha.hasInternalDamage())
return stop()
if(mecha.hasInternalDamage(MECHA_INT_FIRE))
if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5))
mecha.clearInternalDamage(MECHA_INT_FIRE)
if(mecha.internal_tank)
if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)))
mecha.setInternalDamage(MECHA_INT_TANK_BREACH)
var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air()
if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents
int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15))
if(mecha.cabin_air && mecha.cabin_air.return_volume()>0)
mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15))
if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2)
mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire")
if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum
mecha.pr_int_temp_processor.stop()
if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank
if(mecha.internal_tank)
var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air()
var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10)
if(mecha.loc && hascall(mecha.loc,"assume_air"))
mecha.loc.assume_air(leaked_gas)
else
del(leaked_gas)
if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
if(mecha.get_charge())
mecha.spark_system.start()
mecha.cell.charge -= min(20,mecha.cell.charge)
mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge)
return
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.
Binary file not shown.
+7
View File
@@ -76,6 +76,8 @@
#define FILE_DIR "code/game/objects/stacks"
#define FILE_DIR "code/game/objects/storage"
#define FILE_DIR "code/game/objects/tanks"
#define FILE_DIR "code/game/vehicles"
#define FILE_DIR "code/game/vehicles/airtight"
#define FILE_DIR "code/game/verbs"
#define FILE_DIR "code/js"
#define FILE_DIR "code/modules"
@@ -569,6 +571,7 @@
#include "code\game\objects\bombspawner.dm"
#include "code\game\objects\cleaner.dm"
#include "code\game\objects\closets.dm"
#include "code\game\objects\contraband.dm"
#include "code\game\objects\crates.dm"
#include "code\game\objects\displaycase.dm"
#include "code\game\objects\door_assembly.dm"
@@ -714,6 +717,10 @@
#include "code\game\objects\tanks\emergency.dm"
#include "code\game\objects\tanks\jetpack.dm"
#include "code\game\objects\tanks\oxygen.dm"
#include "code\game\vehicles\vehicle.dm"
#include "code\game\vehicles\airtight\airtight.dm"
#include "code\game\vehicles\airtight\land.dm"
#include "code\game\vehicles\airtight\space.dm"
#include "code\game\verbs\AI_status.dm"
#include "code\game\verbs\authorize.dm"
#include "code\game\verbs\ooc.dm"