copmile fixes, rework a few things to better fit tg code structure, replace tgstation.2.0.9.1.dmm with tgstation.2.1.0.dmm (kept old map file), tgstation.2.0.9.1.dmm has 1233 errors

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-01-14 21:07:16 +10:00
parent bdeb96b7e5
commit 1c9b04ec74
58 changed files with 1759 additions and 1722 deletions
@@ -59,6 +59,7 @@
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
var/uses = 10
/obj/item/weapon/card/id
name = "identification card"
@@ -69,8 +70,14 @@
var/registered_name = null // The name registered_name on the card
slot_flags = SLOT_ID
var/blood_type = "\[UNSET\]"
var/dna_hash = "\[UNSET\]"
var/fingerprint_hash = "\[UNSET\]"
var/assignment = null
var/assignment_real_title = null
var/dorm = 0 // determines if this ID has claimed a dorm already
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
O.show_message(text("[] shows you: \icon[] []: assignment: []", user, src, src.name, src.assignment), 1)
@@ -63,7 +63,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/lit = 0
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
var/icon_off = "cigoff"
var/butt_icon = "cigbutt"
var/type_butt = /obj/item/weapon/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 15
@@ -86,12 +86,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
if(Z.light_on)
if(Z.lit)
light("<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.</span>")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.light_on)
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/match))
@@ -116,16 +116,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob)
..()
if(lit == 0)
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
else //if not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume)
user << "<span class='notice'>[glass] is empty.</span>"
else
user << "<span class='notice'>[src] is full.</span>"
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
else //if not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume)
user << "<span class='notice'>[glass] is empty.</span>"
else
user << "<span class='notice'>[src] is full.</span>"
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
@@ -157,50 +156,38 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
put_out()
new type_butt(location)
processing_objects.Remove(src)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out.</span>"
//M.u_equip(src) //un-equip it so the overlays can update
//M.update_inv_wear_mask(0)
M.u_equip(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
del(src)
return
if(lit == 1)
if(location)
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
var/mob/living/carbon/C = loc
if(prob(15)) // so it's not an instarape in case of acid
reagents.reaction(C, INGEST)
reagents.trans_to(C, REAGENTS_METABOLISM)
else // else just remove some of the reagents
reagents.remove_any(REAGENTS_METABOLISM)
if(location)
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
var/mob/living/carbon/C = loc
if(prob(15)) // so it's not an instarape in case of acid
reagents.reaction(C, INGEST)
reagents.trans_to(C, REAGENTS_METABOLISM)
else // else just remove some of the reagents
reagents.remove_any(REAGENTS_METABOLISM)
return
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
if(lit == 1)
var/mob/living/carbon/human/H = user
if(H.shoes)
user.visible_message("<span class='notice'>[user] crushes [src] on the sole of his shoes, putting it out instantly.</span>")
else
user.visible_message("<span class='notice'>[user] spits oh his fingers, then puts down [src].</span>")
put_out()
user.visible_message("<span class='notice'>[user] calmly drops and treads on the lit [src], putting it out instantly.</span>")
var/turf/T = get_turf(src)
new type_butt(T)
processing_objects.Remove(src)
del(src)
return ..()
/obj/item/clothing/mask/cigarette/proc/put_out()
if(src.lit == 1)
src.lit = -1
icon_state = src.butt_icon
desc = "Old manky [src] butt."
name = "[src] butt"
attack_verb = list("poked")
processing_objects.Remove(src)
if (usr)
usr.update_inv_l_hand()
usr.update_inv_r_hand()
////////////
// CIGARS //
@@ -211,7 +198,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = "cigaroff"
icon_on = "cigaron"
icon_off = "cigaroff"
butt_icon = "cigarbutt"
type_butt = /obj/item/weapon/cigbutt/cigarbutt
throw_speed = 0.5
item_state = "cigaroff"
smoketime = 1500
@@ -247,6 +234,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = "cigarbutt"
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/match))
..()
else
user << "<span class='notice'>\The [src] straight out REFUSES to be lit by such uncivilized means.</span>"
/////////////////
//SMOKING PIPES//
/////////////////
@@ -300,6 +293,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime = initial(smoketime)
return
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/match))
..()
else
user << "<span class='notice'>\The [src] straight out REFUSES to be lit by such means.</span>"
/obj/item/clothing/mask/cigarette/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters."
@@ -327,8 +326,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
flags = TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
attack_verb = list("burnt", "singed")
light_on = 0
brightness_on = 2 //luminosity when on
var/lit = 0
/obj/item/weapon/lighter/zippo
name = "Zippo lighter"
@@ -347,28 +345,24 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/lighter/attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src)
if(!light_on)
light_on = 1
if(!lit)
lit = 1
icon_state = icon_on
item_state = icon_on
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
else
if(prob(90))
if(prob(75))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
else
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
if (user.l_hand == src)
user.apply_damage(2,BURN,"l_hand")
else
user.apply_damage(2,BURN,"r_hand")
user.adjustFireLoss(5)
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity + 2)
processing_objects.Add(src)
else
light_on = 0
lit = 0
icon_state = icon_off
item_state = icon_off
if(istype(src, /obj/item/weapon/lighter/zippo) )
@@ -376,7 +370,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
user.SetLuminosity(search_light(user, src))
user.SetLuminosity(user.luminosity - 2)
processing_objects.Remove(src)
else
return ..()
@@ -387,7 +381,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!istype(M, /mob))
return
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && light_on)
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
@@ -407,24 +401,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/lighter/pickup(mob/user)
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
if(lit)
SetLuminosity(0)
user.SetLuminosity(user.luminosity+2)
return
/obj/item/weapon/lighter/dropped(mob/user)
if(light_on)
if ((layer <= 3) || (loc != user.loc))
user.SetLuminosity(search_light(user, src))
SetLuminosity(brightness_on)
return
/obj/item/weapon/lighter/equipped(mob/user, slot)
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
SetLuminosity(0)
if(lit)
user.SetLuminosity(user.luminosity-2)
SetLuminosity(2)
return
@@ -22,16 +22,17 @@
w_class = 1.0
origin_tech = "materials=1;biotech=1"
/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
/*HAHA, SUCK IT, 2000 LINES OF SPAGHETTI CODE!
NOW YOUR JOB IOS DONE BY ONLY 500 LINES OF SPAGHETTI CODE!
LOOK FOR SURGERY.DM*/
/*
/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
@@ -119,6 +120,7 @@ LOOK FOR SURGERY.DM*/
return ..()
return
*/
/*
* Hemostat
@@ -135,6 +137,7 @@ LOOK FOR SURGERY.DM*/
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "pinched")
/*
/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -252,6 +255,7 @@ LOOK FOR SURGERY.DM*/
return ..()
return
*/
/*
* Cautery
@@ -268,6 +272,7 @@ LOOK FOR SURGERY.DM*/
origin_tech = "materials=1;biotech=1"
attack_verb = list("burnt")
/*
/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -340,6 +345,7 @@ LOOK FOR SURGERY.DM*/
return ..()
return
*/
/*
* Surgical Drill
@@ -362,6 +368,7 @@ LOOK FOR SURGERY.DM*/
viewers(user) << pick("/red <b>[user] is pressing the [src] to \his temple and activating it! It looks like \he's trying to commit suicide.</b>", \
"/red <b>[user] is pressing [src] to \his chest and activating it! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/*
* Scalpel
*/
@@ -387,6 +394,7 @@ LOOK FOR SURGERY.DM*/
"\red <b>[user] is slitting \his stomach open with the [src]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/*
/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
@@ -610,7 +618,7 @@ LOOK FOR SURGERY.DM*/
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()*/
return
*/
/*
* Circular Saw
@@ -632,6 +640,7 @@ LOOK FOR SURGERY.DM*/
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")
/*
/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
@@ -780,6 +789,7 @@ LOOK FOR SURGERY.DM*/
return ..()
*/
return
*/
//misc, formerly from code/defines/weapons.dm
/obj/item/weapon/bonegel