mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Fowl's Bugfixes 1 (#521)
This commit is contained in:
@@ -39,7 +39,7 @@ var/global/list/faction_choices = list(
|
||||
"Grayson Manufactories Ltd.",
|
||||
"Aether Atmospherics",
|
||||
"Zeng-Hu Pharmaceuticals",
|
||||
"Hesphaistos Industries"
|
||||
"Hephaestus Industries"
|
||||
)
|
||||
|
||||
var/global/list/religion_choices = list(
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
T.amount = starting_funds
|
||||
if(!source_db)
|
||||
//set a random date, time and location some time over the past few decades
|
||||
T.date = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 25[rand(10,56)]"
|
||||
T.date = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 24[rand(10,48)]"
|
||||
T.time = "[rand(0,24)]:[rand(11,59)]"
|
||||
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number && !D.suspended)
|
||||
D.money += amount
|
||||
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = source_name
|
||||
@@ -93,9 +93,9 @@
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = terminal_id
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/weapon/spacecash
|
||||
name = "0 Thaler"
|
||||
desc = "It's worth 0 Thalers."
|
||||
name = "0 credit chip"
|
||||
desc = "It's worth 0 credits."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "spacecash1"
|
||||
@@ -36,13 +36,14 @@
|
||||
h_user.drop_from_inventory(src)
|
||||
h_user.drop_from_inventory(bundle)
|
||||
h_user.put_in_hands(bundle)
|
||||
user << "<span class='notice'>You add [src.worth] Thalers worth of money to the bundles.<br>It holds [bundle.worth] Thalers now.</span>"
|
||||
user << "<span class='notice'>You add [src.worth] credits worth of money to the bundles.<br>It holds [bundle.worth] credits now.</span>"
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/spacecash/bundle
|
||||
name = "pile of thalers"
|
||||
name = "credit chips"
|
||||
icon_state = ""
|
||||
desc = "They are worth 0 Thalers."
|
||||
gender = PLURAL
|
||||
desc = "They are worth 0 credits."
|
||||
worth = 0
|
||||
|
||||
/obj/item/weapon/spacecash/bundle/update_icon()
|
||||
@@ -59,17 +60,17 @@
|
||||
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
|
||||
banknote.transform = M
|
||||
src.overlays += banknote
|
||||
if(num == 0) // Less than one thaler, let's just make it look like 1 for ease
|
||||
if(num == 0) // Less than one credit, let's just make it look like 1 for ease
|
||||
var/image/banknote = image('icons/obj/items.dmi', "spacecash1")
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(rand(-6, 6), rand(-4, 8))
|
||||
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
|
||||
banknote.transform = M
|
||||
src.overlays += banknote
|
||||
src.desc = "They are worth [worth] Thalers."
|
||||
src.desc = "They are worth [worth] credits."
|
||||
|
||||
/obj/item/weapon/spacecash/bundle/attack_self()
|
||||
var/amount = input(usr, "How many Thalers do you want to take? (0 to [src.worth])", "Take Money", 20) as num
|
||||
var/amount = input(usr, "How many credits do you want to take? (0 to [src.worth])", "Take Money", 20) as num
|
||||
amount = round(Clamp(amount, 0, src.worth))
|
||||
if(amount==0) return 0
|
||||
|
||||
@@ -90,51 +91,51 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/spacecash/c1
|
||||
name = "1 Thaler"
|
||||
name = "1 credit chip"
|
||||
icon_state = "spacecash1"
|
||||
desc = "It's worth 1 credit."
|
||||
worth = 1
|
||||
|
||||
/obj/item/weapon/spacecash/c10
|
||||
name = "10 Thaler"
|
||||
name = "10 credit chip"
|
||||
icon_state = "spacecash10"
|
||||
desc = "It's worth 10 Thalers."
|
||||
desc = "It's worth 10 credits."
|
||||
worth = 10
|
||||
|
||||
/obj/item/weapon/spacecash/c20
|
||||
name = "20 Thaler"
|
||||
name = "20 credit chip"
|
||||
icon_state = "spacecash20"
|
||||
desc = "It's worth 20 Thalers."
|
||||
desc = "It's worth 20 credits."
|
||||
worth = 20
|
||||
|
||||
/obj/item/weapon/spacecash/c50
|
||||
name = "50 Thaler"
|
||||
name = "50 credit chip"
|
||||
icon_state = "spacecash50"
|
||||
desc = "It's worth 50 Thalers."
|
||||
desc = "It's worth 50 credits."
|
||||
worth = 50
|
||||
|
||||
/obj/item/weapon/spacecash/c100
|
||||
name = "100 Thaler"
|
||||
name = "100 credit chip"
|
||||
icon_state = "spacecash100"
|
||||
desc = "It's worth 100 Thalers."
|
||||
desc = "It's worth 100 credits."
|
||||
worth = 100
|
||||
|
||||
/obj/item/weapon/spacecash/c200
|
||||
name = "200 Thaler"
|
||||
name = "200 credit chip"
|
||||
icon_state = "spacecash200"
|
||||
desc = "It's worth 200 Thalers."
|
||||
desc = "It's worth 200 credits."
|
||||
worth = 200
|
||||
|
||||
/obj/item/weapon/spacecash/c500
|
||||
name = "500 Thaler"
|
||||
name = "500 credit chip"
|
||||
icon_state = "spacecash500"
|
||||
desc = "It's worth 500 Thalers."
|
||||
desc = "It's worth 500 credits."
|
||||
worth = 500
|
||||
|
||||
/obj/item/weapon/spacecash/c1000
|
||||
name = "1000 Thaler"
|
||||
name = "1000 credit chip"
|
||||
icon_state = "spacecash1000"
|
||||
desc = "It's worth 1000 Thalers."
|
||||
desc = "It's worth 1000 credits."
|
||||
worth = 1000
|
||||
|
||||
proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
@@ -160,4 +161,4 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
/obj/item/weapon/spacecash/ewallet/examine(mob/user)
|
||||
..(user)
|
||||
if (!(user in view(2)) && user!=src.loc) return
|
||||
user << "\blue Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]."
|
||||
user << "\blue Charge card's owner: [src.owner_name]. Credit chips remaining: [src.worth]."
|
||||
|
||||
@@ -112,7 +112,7 @@ var/global/economy_init = 0
|
||||
T.target_name = station_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = 75000
|
||||
T.date = "2nd April, 2555"
|
||||
T.date = "2nd April, 2454"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
|
||||
@@ -134,7 +134,7 @@ var/global/economy_init = 0
|
||||
T.target_name = department_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = department_account.money
|
||||
T.date = "2nd April, 2555"
|
||||
T.date = "2nd April, 2454"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
|
||||
var/body = "Nyx Daily wishes to congratulate <b>[winner_name]</b> for recieving the Nyx Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"
|
||||
if(!deposit_success)
|
||||
body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 Thalers to ND 'Stellar Slam' office on the Nyx gateway containing updated details, and your winnings'll be re-sent within the month."
|
||||
body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 credits to ND 'Stellar Slam' office on the Nyx gateway containing updated details, and your winnings'll be re-sent within the month."
|
||||
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
@@ -126,6 +126,6 @@ var/global/list/default_pai_software = list()
|
||||
|
||||
else if(href_list["image"])
|
||||
var/img = text2num(href_list["image"])
|
||||
if(1 <= img && img <= 9)
|
||||
if(1 <= img && img <= 15)
|
||||
card.setEmotion(img)
|
||||
return 1
|
||||
|
||||
@@ -925,9 +925,10 @@
|
||||
if (istype(tile, /turf/simulated))
|
||||
var/turf/simulated/S = tile
|
||||
S.dirt = 0
|
||||
S.color = null
|
||||
for(var/A in tile)
|
||||
if(istype(A, /obj/effect))
|
||||
if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay))
|
||||
if(istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay))
|
||||
qdel(A)
|
||||
else if(istype(A, /obj/item))
|
||||
var/obj/item/cleaned_item = A
|
||||
|
||||
@@ -22,7 +22,7 @@ var/global/datum/robolimb/basic_robolimb
|
||||
icon = 'icons/mob/human_races/cyberlimbs/bishop.dmi'
|
||||
|
||||
/datum/robolimb/hesphaistos
|
||||
company = "Hesphiastos Industries"
|
||||
company = "Hephaestus Industries"
|
||||
desc = "This limb has a militaristic black and green casing with gold stripes."
|
||||
icon = 'icons/mob/human_races/cyberlimbs/hesphaistos.dmi'
|
||||
|
||||
|
||||
@@ -119,6 +119,18 @@
|
||||
/obj/effect/projectile/stun/impact
|
||||
icon_state = "impact_stun"
|
||||
|
||||
//----------------------------
|
||||
// Eye beam
|
||||
//----------------------------
|
||||
/obj/effect/projectile/eyelaser/tracer
|
||||
icon_state = "eye"
|
||||
|
||||
/obj/effect/projectile/eyelaser/muzzle
|
||||
icon_state = "muzzle_eye"
|
||||
|
||||
/obj/effect/projectile/eyelaser/impact
|
||||
icon_state = "impact_eye"
|
||||
|
||||
//----------------------------
|
||||
// Bullet
|
||||
//----------------------------
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
y_offset = rand(-1,1)
|
||||
x_offset = rand(-1,1)
|
||||
|
||||
return !P.launch(target, user, src, target_zone, x_offset, y_offset)
|
||||
return !P.launch_from_gun(target, user, src, target_zone, x_offset, y_offset)
|
||||
|
||||
//Suicide handling.
|
||||
/obj/item/weapon/gun/var/mouthshoot = 0 //To stop people from suiciding twice... >.>
|
||||
|
||||
@@ -114,21 +114,13 @@
|
||||
p_x = between(0, p_x + rand(-radius, radius), world.icon_size)
|
||||
p_y = between(0, p_y + rand(-radius, radius), world.icon_size)
|
||||
|
||||
//called to launch a projectile from a gun
|
||||
/obj/item/projectile/proc/launch(atom/target, mob/user, obj/item/weapon/gun/launcher, var/target_zone, var/x_offset=0, var/y_offset=0)
|
||||
var/turf/curloc = get_turf(user)
|
||||
//called to launch a projectile
|
||||
/obj/item/projectile/proc/launch(atom/target, var/target_zone, var/x_offset=0, var/y_offset=0, var/angle_offset=0)
|
||||
var/turf/curloc = get_turf(src)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return 1
|
||||
|
||||
firer = user
|
||||
def_zone = target_zone
|
||||
|
||||
if(user == target) //Shooting yourself
|
||||
user.bullet_act(src, target_zone)
|
||||
on_impact(user)
|
||||
qdel(src)
|
||||
return 0
|
||||
if(targloc == curloc) //Shooting something in the same turf
|
||||
target.bullet_act(src, target_zone)
|
||||
on_impact(target)
|
||||
@@ -136,31 +128,38 @@
|
||||
return 0
|
||||
|
||||
original = target
|
||||
loc = curloc
|
||||
starting = curloc
|
||||
current = curloc
|
||||
yo = targloc.y - curloc.y + y_offset
|
||||
xo = targloc.x - curloc.x + x_offset
|
||||
|
||||
shot_from = launcher
|
||||
silenced = launcher.silenced
|
||||
def_zone = target_zone
|
||||
|
||||
spawn()
|
||||
setup_trajectory(curloc, targloc, x_offset, y_offset, angle_offset) //plot the initial trajectory
|
||||
process()
|
||||
|
||||
return 0
|
||||
|
||||
//called to launch a projectile from a gun
|
||||
/obj/item/projectile/proc/launch_from_gun(atom/target, mob/user, obj/item/weapon/gun/launcher, var/target_zone, var/x_offset=0, var/y_offset=0)
|
||||
if(user == target) //Shooting yourself
|
||||
user.bullet_act(src, target_zone)
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
loc = get_turf(user) //move the projectile out into the world
|
||||
|
||||
firer = user
|
||||
shot_from = launcher.name
|
||||
silenced = launcher.silenced
|
||||
|
||||
return launch(target, target_zone, x_offset, y_offset)
|
||||
|
||||
//Used to change the direction of the projectile in flight.
|
||||
/obj/item/projectile/proc/redirect(var/new_x, var/new_y, var/atom/starting_loc, var/mob/new_firer=null)
|
||||
original = locate(new_x, new_y, src.z)
|
||||
starting = starting_loc
|
||||
current = starting_loc
|
||||
var/turf/new_target = locate(new_x, new_y, src.z)
|
||||
|
||||
original = new_target
|
||||
if(new_firer)
|
||||
firer = src
|
||||
|
||||
yo = new_y - starting_loc.y
|
||||
xo = new_x - starting_loc.x
|
||||
setup_trajectory()
|
||||
setup_trajectory(starting_loc, new_target)
|
||||
|
||||
//Called when the projectile intercepts a mob. Returns 1 if the projectile hit the mob, 0 if it missed and should keep flying.
|
||||
/obj/item/projectile/proc/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier=0)
|
||||
@@ -177,14 +176,15 @@
|
||||
result = target_mob.bullet_act(src, def_zone)
|
||||
|
||||
if(result == PROJECTILE_FORCE_MISS && (can_miss == 0)) //if you're shooting at point blank you can't miss.
|
||||
visible_message("<span class='notice'>\The [src] misses [target_mob] narrowly!</span>")
|
||||
if(!silenced)
|
||||
target_mob.visible_message("<span class='notice'>\The [src] misses [target_mob] narrowly!</span>")
|
||||
return 0
|
||||
|
||||
//hit messages
|
||||
if(silenced)
|
||||
target_mob << "<span class='danger'>You've been hit in the [parse_zone(def_zone)] by \the [src]!</span>"
|
||||
else
|
||||
visible_message("<span class='danger'>\The [target_mob] is hit by \the [src] in the [parse_zone(def_zone)]!</span>")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
target_mob.visible_message("<span class='danger'>\The [target_mob] is hit by \the [src] in the [parse_zone(def_zone)]!</span>")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
|
||||
//admin logs
|
||||
if(!no_attack_log)
|
||||
@@ -268,20 +268,15 @@
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
/obj/item/projectile/ex_act()
|
||||
return //explosions probably shouldn't delete projectiles
|
||||
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(95) //ha
|
||||
else
|
||||
return 1
|
||||
/obj/item/projectile/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/process()
|
||||
var/first_step = 1
|
||||
|
||||
//plot the initial trajectory
|
||||
setup_trajectory()
|
||||
|
||||
spawn while(src && src.loc)
|
||||
if(kill_count-- < 1)
|
||||
on_impact(src.loc) //for any final impact behaviours
|
||||
@@ -319,9 +314,15 @@
|
||||
sleep(step_delay) //add delay between movement iterations if it's not a hitscan weapon
|
||||
|
||||
/obj/item/projectile/proc/before_move()
|
||||
return
|
||||
return 0
|
||||
|
||||
/obj/item/projectile/proc/setup_trajectory(turf/startloc, turf/targloc, var/x_offset = 0, var/y_offset = 0)
|
||||
// setup projectile state
|
||||
starting = startloc
|
||||
current = startloc
|
||||
yo = targloc.y - startloc.y + y_offset
|
||||
xo = targloc.x - startloc.x + x_offset
|
||||
|
||||
/obj/item/projectile/proc/setup_trajectory()
|
||||
// trajectory dispersion
|
||||
var/offset = 0
|
||||
if(dispersion)
|
||||
@@ -380,7 +381,6 @@
|
||||
invisibility = 101 //Nope! Can't see me!
|
||||
yo = null
|
||||
xo = null
|
||||
var/target = null
|
||||
var/result = 0 //To pass the message back to the gun.
|
||||
|
||||
/obj/item/projectile/test/Bump(atom/A as mob|obj|turf|area)
|
||||
@@ -395,25 +395,24 @@
|
||||
result = 1
|
||||
return
|
||||
|
||||
/obj/item/projectile/test/process()
|
||||
/obj/item/projectile/test/launch(atom/target)
|
||||
var/turf/curloc = get_turf(src)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if(!curloc || !targloc)
|
||||
return 0
|
||||
yo = targloc.y - curloc.y
|
||||
xo = targloc.x - curloc.x
|
||||
target = targloc
|
||||
|
||||
original = target
|
||||
starting = curloc
|
||||
|
||||
//plot the initial trajectory
|
||||
setup_trajectory()
|
||||
setup_trajectory(curloc, targloc)
|
||||
return process(targloc)
|
||||
|
||||
/obj/item/projectile/test/process(var/turf/targloc)
|
||||
while(src) //Loop on through!
|
||||
if(result)
|
||||
return (result - 1)
|
||||
if((!( target ) || loc == target))
|
||||
target = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge
|
||||
if((!( targloc ) || loc == targloc))
|
||||
targloc = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge
|
||||
|
||||
trajectory.increment() // increment the current location
|
||||
location = trajectory.return_location(location) // update the locally stored location data
|
||||
@@ -424,18 +423,22 @@
|
||||
if(istype(M)) //If there is someting living...
|
||||
return 1 //Return 1
|
||||
else
|
||||
M = locate() in get_step(src,target)
|
||||
M = locate() in get_step(src,targloc)
|
||||
if(istype(M))
|
||||
return 1
|
||||
|
||||
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=null) //Checks if you can hit them or not.
|
||||
//Helper proc to check if you can hit them or not.
|
||||
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=null)
|
||||
if(!istype(target) || !istype(firer))
|
||||
return 0
|
||||
|
||||
var/obj/item/projectile/test/trace = new /obj/item/projectile/test(get_turf(firer)) //Making the test....
|
||||
trace.target = target
|
||||
|
||||
//Set the flags and pass flags to that of the real projectile...
|
||||
if(!isnull(flags))
|
||||
trace.flags = flags //Set the flags...
|
||||
trace.pass_flags = pass_flags //And the pass flags to that of the real projectile...
|
||||
var/output = trace.process() //Test it!
|
||||
trace.flags = flags
|
||||
trace.pass_flags = pass_flags
|
||||
|
||||
var/output = trace.launch(target) //Test it!
|
||||
qdel(trace) //No need for it anymore
|
||||
return output //Send it back to the gun!
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
kill_count = 100
|
||||
embed = 0
|
||||
incinerate = 40
|
||||
// incinerate = 40
|
||||
weaken = 5
|
||||
stun = 5
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
return
|
||||
|
||||
else
|
||||
trans = reagents.splash(target, amount_per_transfer_from_this) //sprinkling reagents on generic non-mobs
|
||||
trans = reagents.trans_to_obj(target, amount_per_transfer_from_this) //sprinkling reagents on generic non-mobs
|
||||
user << "<span class='notice'>You transfer [trans] units of the solution.</span>"
|
||||
|
||||
else // Taking from something
|
||||
|
||||
Reference in New Issue
Block a user