Merged money, ATMs, bible changes, nullrod changes, policetape.

This commit is contained in:
Erthilo
2012-09-03 01:29:53 +01:00
parent f645a9c5a9
commit 3aa8982a81
11 changed files with 220 additions and 44 deletions

View File

@@ -1263,6 +1263,7 @@
#include "code\modules\security levels\security levels.dm" #include "code\modules\security levels\security levels.dm"
#include "code\WorkInProgress\buildmode.dm" #include "code\WorkInProgress\buildmode.dm"
#include "code\WorkInProgress\explosion_particles.dm" #include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\animusstation\atm.dm"
#include "code\WorkInProgress\Cael_Aislinn\energy_field.dm" #include "code\WorkInProgress\Cael_Aislinn\energy_field.dm"
#include "code\WorkInProgress\Cael_Aislinn\external_shield_gen.dm" #include "code\WorkInProgress\Cael_Aislinn\external_shield_gen.dm"
#include "code\WorkInProgress\Cael_Aislinn\shield_capacitor.dm" #include "code\WorkInProgress\Cael_Aislinn\shield_capacitor.dm"
@@ -1280,6 +1281,7 @@
#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm" #include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm" #include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm" #include "code\WorkInProgress\Mini\atmos_control.dm"
#include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm" #include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
#include "code\WorkInProgress\Tastyfish\livestock.dm" #include "code\WorkInProgress\Tastyfish\livestock.dm"
#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm" #include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"

View File

@@ -21,7 +21,7 @@ log transactions
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob) /obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(ishuman(user)) if(ishuman(user))
var/obj/item/weapon/card/id/user_id = src.scan_user(user) var/obj/item/weapon/card/id/user_id = src.scan_user(user)
if(istype(I,/obj/item/weapon/money)) if(istype(I,/obj/item/weapon/spacecash))
user_id.money += I:worth user_id.money += I:worth
del I del I
@@ -51,21 +51,21 @@ log transactions
//hueg switch for giving moneh out //hueg switch for giving moneh out
switch(amount) switch(amount)
if(1) if(1)
new /obj/item/weapon/money(loc) new /obj/item/weapon/spacecash(loc)
if(10) if(10)
new /obj/item/weapon/money/c10(loc) new /obj/item/weapon/spacecash/c10(loc)
if(20) if(20)
new /obj/item/weapon/money/c20(loc) new /obj/item/weapon/spacecash/c20(loc)
if(50) if(50)
new /obj/item/weapon/money/c50(loc) new /obj/item/weapon/spacecash/c50(loc)
if(100) if(100)
new /obj/item/weapon/money/c100(loc) new /obj/item/weapon/spacecash/c100(loc)
if(200) if(200)
new /obj/item/weapon/money/c200(loc) new /obj/item/weapon/spacecash/c200(loc)
if(500) if(500)
new /obj/item/weapon/money/c500(loc) new /obj/item/weapon/spacecash/c500(loc)
if(1000) if(1000)
new /obj/item/weapon/money/c1000(loc) new /obj/item/weapon/spacecash/c1000(loc)
else else
usr << browse("You don't have that much money!<br/><a href=\"?src=\ref[src]\">Back</a>","window=atm") usr << browse("You don't have that much money!<br/><a href=\"?src=\ref[src]\">Back</a>","window=atm")
return return

View File

@@ -1,3 +1,21 @@
//Define all tape types in policetape.dm
/obj/item/taperoll
name = "tape roll"
icon = 'policetape.dmi'
icon_state = "rollstart"
flags = FPRINT
w_class = 1.0
var/turf/start
var/turf/end
var/tape_type = /obj/item/tape
var/icon_base
/obj/item/tape
name = "tape"
icon = 'policetape.dmi'
anchored = 1
density = 1
var/icon_base
/obj/item/taperoll/police /obj/item/taperoll/police
name = "police tape" name = "police tape"
@@ -116,7 +134,7 @@
breaktape(/obj/item/weapon/wirecutters,user) breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob) /obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!is_sharp(W) && src.allowed(user)) ||(!is_cut(W) && !src.allowed(user)))) if(user.a_intent == "help" && ((!is_sharp(W) && src.allowed(user))))
user << "You can't break the [src] with that!" user << "You can't break the [src] with that!"
return return
user.show_viewers("\blue [user] breaks the [src]!") user.show_viewers("\blue [user] breaks the [src]!")

View File

@@ -18,13 +18,13 @@ log transactions
use_power = 1 use_power = 1
idle_power_usage = 10 idle_power_usage = 10
var/obj/item/weapon/card/id/card var/obj/item/weapon/card/id/card
var/obj/item/weapon/money/cashes = list() var/obj/item/weapon/spacecash/cashes = list()
var/inserted = 0 var/inserted = 0
var/accepted = 0 var/accepted = 0
var/pincode = 0 var/pincode = 0
attackby(var/obj/A, var/mob/user) attackby(var/obj/A, var/mob/user)
if(istype(A,/obj/item/weapon/money)) if(istype(A,/obj/item/weapon/spacecash))
cashes += A cashes += A
user.drop_item() user.drop_item()
A.loc = src A.loc = src
@@ -101,21 +101,21 @@ log transactions
card.money -= amount card.money -= amount
switch(amount) switch(amount)
if(1) if(1)
new /obj/item/weapon/money(loc) new /obj/item/weapon/spacecash(loc)
if(10) if(10)
new /obj/item/weapon/money/c10(loc) new /obj/item/weapon/spacecash/c10(loc)
if(20) if(20)
new /obj/item/weapon/money/c20(loc) new /obj/item/weapon/spacecash/c20(loc)
if(50) if(50)
new /obj/item/weapon/money/c50(loc) new /obj/item/weapon/spacecash/c50(loc)
if(100) if(100)
new /obj/item/weapon/money/c100(loc) new /obj/item/weapon/spacecash/c100(loc)
if(200) if(200)
new /obj/item/weapon/money/c200(loc) new /obj/item/weapon/spacecash/c200(loc)
if(500) if(500)
new /obj/item/weapon/money/c500(loc) new /obj/item/weapon/spacecash/c500(loc)
if(1000) if(1000)
new /obj/item/weapon/money/c1000(loc) new /obj/item/weapon/spacecash/c1000(loc)
else else
user << "\red Error: Insufficient funds." user << "\red Error: Insufficient funds."
return return
@@ -144,7 +144,7 @@ log transactions
if (usr.machine==src && get_dist(src, usr) <= 1 || istype(usr, /mob/living/silicon/ai)) if (usr.machine==src && get_dist(src, usr) <= 1 || istype(usr, /mob/living/silicon/ai))
if(href_list["eca"]) if(href_list["eca"])
if(accepted) if(accepted)
for(var/obj/item/weapon/money/M in cashes) for(var/obj/item/weapon/spacecash/M in cashes)
M.loc = loc M.loc = loc
inserted = 0 inserted = 0
if(!cashes) if(!cashes)
@@ -166,3 +166,11 @@ log transactions
else else
usr.machine = null usr.machine = null
usr << browse(null,"window=atm") usr << browse(null,"window=atm")
/obj/item/weapon/card/id/proc/checkaccess(p,var/mob/user)
if(p == pin)
user << "\green Access granted"
return 1
user << "\red Access denied"
return 0

View File

@@ -446,7 +446,7 @@
/obj/item/weapon/storage/bible /obj/item/weapon/storage/bible
name = "bible" name = "bible"
desc = "Apply to head repeatedly." desc = "A holy book." //BS12 EDIT
icon_state ="bible" icon_state ="bible"
throw_speed = 1 throw_speed = 1
throw_range = 5 throw_range = 5
@@ -457,8 +457,7 @@
/obj/item/weapon/storage/bible/booze /obj/item/weapon/storage/bible/booze
name = "bible" name = "bible"
desc = "To be applied to the head repeatedly." desc = "A holy book. Smells faintly of alcohol" //BS12 EDIT
icon_state ="bible"
/obj/item/weapon/storage/mousetraps /obj/item/weapon/storage/mousetraps
name = "box of Pest-B-Gon Mousetraps" name = "box of Pest-B-Gon Mousetraps"

View File

@@ -63,7 +63,48 @@
throwforce = 10 throwforce = 10
w_class = 1 w_class = 1
/obj/item/weapon/sord //BS12 EDIT
/obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The rod slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(20)
return
if (M.stat !=2)
if((M.mind in ticker.mode.cult) && prob(33))
M << "\red The power of [src] clears your mind of the cult's influence!"
user << "\red You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal."
ticker.mode.remove_cultist(M.mind)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
else if(prob(10))
user << "\red The rod slips in your hand."
..()
else
user << "\red The rod appears to do nothing."
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
return
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob)
if (istype(A, /turf/simulated/floor))
user << "\blue You hit the floor with the [src]."
call(/obj/effect/rune/proc/revealrunes)(src)
/*/obj/item/weapon/sord
name = "\improper SORD" name = "\improper SORD"
desc = "This thing is so unspeakably shitty you are having a hard time even holding it." desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
icon_state = "sord" icon_state = "sord"
@@ -74,7 +115,7 @@
throwforce = 1 throwforce = 1
w_class = 3 w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
*/ //BS12 EDIT
/obj/item/weapon/claymore /obj/item/weapon/claymore
name = "claymore" name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!" desc = "What are you standing around staring at this for? Get to killing!"
@@ -160,8 +201,8 @@
g_amt = 15000 g_amt = 15000
/obj/item/weapon/spacecash /obj/item/weapon/spacecash
name = "space cash" name = "stack of credits"
desc = "It's worth 1 credit." desc = "1 credit."
gender = PLURAL gender = PLURAL
icon = 'icons/obj/items.dmi' icon = 'icons/obj/items.dmi'
icon_state = "spacecash" icon_state = "spacecash"
@@ -173,37 +214,140 @@
throw_speed = 1 throw_speed = 1
throw_range = 2 throw_range = 2
w_class = 1.0 w_class = 1.0
var/currency
var/worth
var/split = 5
var/round = 0.01
var/access = list() var/access = list()
access = access_crate_cash access = access_crate_cash
/obj/item/weapon/spacecash/proc/updatedesc()
name = "stack of [currency]"
desc = "A pile of [worth] [currency]"
/obj/item/weapon/spacecash/New(var/nloc, var/nworth=1,var/ncurrency = "credits")
if(!worth)
worth = nworth
if(!currency)
currency = ncurrency
split = round(worth/2,round)
updatedesc()
return ..(nloc)
/obj/item/weapon/spacecash/c10 /obj/item/weapon/spacecash/c10
icon_state = "spacecash10" icon_state = "spacecash10"
access = access_crate_cash access = access_crate_cash
desc = "It's worth 10 credits." desc = "A pile of 10 credits."
worth = 10
/obj/item/weapon/spacecash/c20 /obj/item/weapon/spacecash/c20
icon_state = "spacecash20" icon_state = "spacecash20"
access = access_crate_cash access = access_crate_cash
desc = "It's worth 20 credits." desc = "A pile of 20 credits."
worth = 20
/obj/item/weapon/spacecash/c50 /obj/item/weapon/spacecash/c50
icon_state = "spacecash50" icon_state = "spacecash50"
access = access_crate_cash access = access_crate_cash
desc = "It's worth 50 credits." desc = "A pile of 50 credits."
worth = 50
/obj/item/weapon/spacecash/c100 /obj/item/weapon/spacecash/c100
icon_state = "spacecash100" icon_state = "spacecash100"
access = access_crate_cash access = access_crate_cash
desc = "It's worth 100 credits." desc = "A pile of 100 credits."
worth = 100
/obj/item/weapon/spacecash/c200 /obj/item/weapon/spacecash/c200
icon_state = "spacecash200" icon_state = "spacecash200"
access = access_crate_cash access = access_crate_cash
desc = "It's worth 200 credits." desc = "A pile of 200 credits."
worth = 200
/obj/item/weapon/spacecash/c500 /obj/item/weapon/spacecash/c500
icon_state = "spacecash500" icon_state = "spacecash500"
access = access_crate_cash access = access_crate_cash
desc = "It's worth 500 credits." desc = "A pile of 500 credits."
worth = 500
/obj/item/weapon/spacecash/c1000 /obj/item/weapon/spacecash/c1000
icon_state = "spacecash1000" icon_state = "spacecash1000"
access = access_crate_cash access = access_crate_cash
desc = "It's worth 1000 credits." desc = "A pile of 1000 credits."
worth = 1000
/obj/item/weapon/spacecash/attack_self(var/mob/user)
interact(user)
/obj/item/weapon/spacecash/proc/interact(var/mob/user)
user.machine = src
var/dat
dat += "<BR>[worth] [currency]"
dat += "<BR>New pile:"
dat += "<A href='?src=\ref[src];sd=5'>-</a>"
dat += "<A href='?src=\ref[src];sd=1'>-</a>"
if(round<=0.1)
dat += "<A href='?src=\ref[src];sd=0.1'>-</a>"
if(round<=0.01)
dat += "<A href='?src=\ref[src];sd=0.01'>-</a>"
dat += "[split]"
if(round<=0.01)
dat += "<A href='?src=\ref[src];su=0.01'>+</a>"
if(round<=0.1)
dat += "<A href='?src=\ref[src];su=0.1'>+</a>"
dat += "<A href='?src=\ref[src];su=1'>+</a>"
dat += "<A href='?src=\ref[src];su=5'>+</a>"
dat += "<BR><A href='?src=\ref[src];split=1'>split</a>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/item/weapon/spacecash/Topic(href, href_list)
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["su"])
var/samt = text2num(href_list["su"])
if(split+samt<worth)
split+=samt
if (href_list["sd"])
var/samt = text2num(href_list["sd"])
if(split-samt>0)
split-=samt
if(href_list["split"])
new /obj/item/weapon/spacecash(get_turf(src),split,currency)
worth-=split
split = round(worth/2,round)
updatedesc()
src.add_fingerprint(usr)
src.updateUsrDialog()
for (var/mob/M in viewers(1, src.loc))
if (M.client && M.machine == src)
src.attack_self(M)
return
/obj/item/weapon/spacecash/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/spacecash))
var/mob/living/carbon/c = user
if(!uppertext(I:currency)==uppertext(currency))
c<<"You can't mix currencies!"
return ..()
else
worth+=I:worth
c<<"You combine the piles."
updatedesc()
del I
return ..()
/obj/item/device/mass_spectrometer /obj/item/device/mass_spectrometer
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample." desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
@@ -562,6 +706,9 @@
var/assignment_real_title = null var/assignment_real_title = null
var/dorm = 0 // determines if this ID has claimed a dorm already var/dorm = 0 // determines if this ID has claimed a dorm already
var/money
var/pin
/obj/item/weapon/card/id/silver /obj/item/weapon/card/id/silver
name = "identification card" name = "identification card"
desc = "A silver card which shows honour and dedication." desc = "A silver card which shows honour and dedication."

View File

@@ -225,11 +225,12 @@ Whitespace:Seperator;
comm.messagetitle.Add("Cent. Com. Status Summary") comm.messagetitle.Add("Cent. Com. Status Summary")
comm.messagetext.Add(intercepttext) comm.messagetext.Add(intercepttext)
world << sound('commandreport.ogg')
command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") /* command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.")
world << sound('sound/AI/intercept.ogg') world << sound('sound/AI/intercept.ogg')
if(security_level < SEC_LEVEL_BLUE) if(security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE) set_security_level(SEC_LEVEL_BLUE)*/
/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=1) /datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=1)

View File

@@ -1203,7 +1203,7 @@ datum
check_completion() check_completion()
var/held_credits = 0 var/held_credits = 0
for(var/obj/item/weapon/money/M in owner.current.get_contents()) for(var/obj/item/weapon/spacecash/M in owner.current.get_contents())
held_credits += M.worth held_credits += M.worth
if(held_credits >= steal_amount) if(held_credits >= steal_amount)
return 1 return 1

View File

@@ -13,7 +13,7 @@
equip(var/mob/living/carbon/human/H) equip(var/mob/living/carbon/human/H)
if(!H) return 0 if(!H) return 0
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible/booze(H) var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
H.equip_to_slot_or_del(B, slot_l_hand) H.equip_to_slot_or_del(B, slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)

View File

@@ -5,7 +5,8 @@
new /obj/item/weapon/spacecash(src) new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src) new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src) new /obj/item/weapon/spacecash(src)
//BS12 EDIT
/* // All cult functionality moved to Null Rod
/obj/item/weapon/storage/bible/proc/bless(mob/living/carbon/M as mob) /obj/item/weapon/storage/bible/proc/bless(mob/living/carbon/M as mob)
if(ishuman(M)) if(ishuman(M))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
@@ -70,12 +71,12 @@
O.show_message(text("\red <B>[] smacks []'s lifeless corpse with [].</B>", user, M, src), 1) O.show_message(text("\red <B>[] smacks []'s lifeless corpse with [].</B>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1) playsound(src.loc, "punch", 25, 1, -1)
return return
*/
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob) /obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob)
if (istype(A, /turf/simulated/floor)) /* if (istype(A, /turf/simulated/floor))
user << "\blue You hit the floor with the bible." user << "\blue You hit the floor with the bible."
if(user.mind && (user.mind.assigned_role == "Chaplain")) if(user.mind && (user.mind.assigned_role == "Chaplain"))
call(/obj/effect/rune/proc/revealrunes)(src) call(/obj/effect/rune/proc/revealrunes)(src)*/
if(user.mind && (user.mind.assigned_role == "Chaplain")) if(user.mind && (user.mind.assigned_role == "Chaplain"))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
user << "\blue You bless [A]." user << "\blue You bless [A]."

View File

@@ -62,4 +62,4 @@
item_state = "judge" item_state = "judge"
flags = FPRINT | TABLEPASS flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/money) allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/spacecash)