mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
@@ -1,11 +1,16 @@
|
|||||||
var/global/datum/getrev/revdata = new()
|
var/global/datum/getrev/revdata = new()
|
||||||
|
|
||||||
/datum/getrev
|
/datum/getrev
|
||||||
|
var/branch
|
||||||
var/revision
|
var/revision
|
||||||
var/date
|
var/date
|
||||||
var/showinfo
|
var/showinfo
|
||||||
|
|
||||||
/datum/getrev/New()
|
/datum/getrev/New()
|
||||||
|
var/list/head_branch = file2list(".git/HEAD", "\n")
|
||||||
|
if(head_branch.len)
|
||||||
|
branch = copytext(head_branch[1], 17)
|
||||||
|
|
||||||
var/list/head_log = file2list(".git/logs/HEAD", "\n")
|
var/list/head_log = file2list(".git/logs/HEAD", "\n")
|
||||||
for(var/line=head_log.len, line>=1, line--)
|
for(var/line=head_log.len, line>=1, line--)
|
||||||
if(head_log[line])
|
if(head_log[line])
|
||||||
@@ -18,7 +23,9 @@ var/global/datum/getrev/revdata = new()
|
|||||||
if(unix_time)
|
if(unix_time)
|
||||||
date = unix2date(unix_time)
|
date = unix2date(unix_time)
|
||||||
break
|
break
|
||||||
|
|
||||||
world.log << "Running revision:"
|
world.log << "Running revision:"
|
||||||
|
world.log << branch
|
||||||
world.log << date
|
world.log << date
|
||||||
world.log << revision
|
world.log << revision
|
||||||
return
|
return
|
||||||
@@ -29,7 +36,7 @@ client/verb/showrevinfo()
|
|||||||
set desc = "Check the current server code revision"
|
set desc = "Check the current server code revision"
|
||||||
|
|
||||||
if(revdata.revision)
|
if(revdata.revision)
|
||||||
src << "<b>Server revision:</b> [revdata.date]"
|
src << "<b>Server revision:</b> [revdata.branch] - [revdata.date]"
|
||||||
if(config.githuburl)
|
if(config.githuburl)
|
||||||
src << "<a href='[config.githuburl]/commit/[revdata.revision]'>[revdata.revision]</a>"
|
src << "<a href='[config.githuburl]/commit/[revdata.revision]'>[revdata.revision]</a>"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -154,15 +154,20 @@
|
|||||||
user << "<span class='warning'>The crate appears to be broken.</span>"
|
user << "<span class='warning'>The crate appears to be broken.</span>"
|
||||||
return
|
return
|
||||||
if(src.allowed(user))
|
if(src.allowed(user))
|
||||||
src.locked = !src.locked
|
set_locked(!locked, user)
|
||||||
for(var/mob/O in viewers(user, 3))
|
|
||||||
if((O.client && !( O.blinded )))
|
|
||||||
O << "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>"
|
|
||||||
overlays.Cut()
|
|
||||||
overlays += locked ? redlight : greenlight
|
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>Access Denied</span>"
|
user << "<span class='notice'>Access Denied</span>"
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/secure/proc/set_locked(var/newlocked, mob/user = null)
|
||||||
|
if(locked == newlocked) return
|
||||||
|
|
||||||
|
locked = newlocked
|
||||||
|
if(user)
|
||||||
|
for(var/mob/O in viewers(user, 3))
|
||||||
|
O.show_message( "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>", 1)
|
||||||
|
overlays.Cut()
|
||||||
|
overlays += locked ? redlight : greenlight
|
||||||
|
|
||||||
/obj/structure/closet/crate/secure/verb/verb_togglelock()
|
/obj/structure/closet/crate/secure/verb/verb_togglelock()
|
||||||
set src in oview(1) // One square distance
|
set src in oview(1) // One square distance
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
icon_state = "securecrate"
|
icon_state = "securecrate"
|
||||||
icon_opened = "securecrateopen"
|
icon_opened = "securecrateopen"
|
||||||
icon_closed = "securecrate"
|
icon_closed = "securecrate"
|
||||||
var/code = null
|
var/list/code = list()
|
||||||
var/lastattempt = null
|
var/list/lastattempt = list()
|
||||||
var/attempts = 10
|
var/attempts = 10
|
||||||
var/codelen = 4
|
var/codelen = 4
|
||||||
locked = 1
|
locked = 1
|
||||||
@@ -14,12 +14,12 @@
|
|||||||
..()
|
..()
|
||||||
var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
|
var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
|
||||||
|
|
||||||
code = ""
|
for(var/i in 1 to codelen)
|
||||||
for(var/i = 0, i < codelen, i++)
|
code += pick(digits)
|
||||||
var/dig = pick(digits)
|
|
||||||
code += dig
|
|
||||||
digits -= dig // Player can enter codes with matching digits, but there are never matching digits in the answer
|
|
||||||
|
|
||||||
|
generate_loot()
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/secure/loot/proc/generate_loot()
|
||||||
var/loot = rand(1, 100)
|
var/loot = rand(1, 100)
|
||||||
switch(loot)
|
switch(loot)
|
||||||
if(1 to 5) // Common things go, 5%
|
if(1 to 5) // Common things go, 5%
|
||||||
@@ -145,58 +145,60 @@
|
|||||||
new/obj/item/clothing/head/bearpelt(src)
|
new/obj/item/clothing/head/bearpelt(src)
|
||||||
|
|
||||||
/obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob)
|
/obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob)
|
||||||
if(locked)
|
if(!locked)
|
||||||
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
|
return
|
||||||
var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
|
|
||||||
if(in_range(src, user))
|
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
|
||||||
if (input == code)
|
var/input = input(user, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
|
||||||
user << "<span class='notice'>The crate unlocks!</span>"
|
if(!Adjacent(user))
|
||||||
locked = 0
|
return
|
||||||
overlays.Cut()
|
|
||||||
overlays += greenlight
|
if(input == null || length(input) != codelen)
|
||||||
else if (input == null || length(input) != codelen)
|
user << "<span class='notice'>You leave the crate alone.</span>"
|
||||||
user << "<span class='notice'>You leave the crate alone.</span>"
|
else if(check_input(input))
|
||||||
else
|
user << "<span class='notice'>The crate unlocks!</span>"
|
||||||
user << "<span class='warning'>A red light flashes.</span>"
|
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||||
lastattempt = input
|
set_locked(0)
|
||||||
attempts--
|
|
||||||
if (attempts == 0)
|
|
||||||
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
|
|
||||||
var/turf/T = get_turf(src.loc)
|
|
||||||
explosion(T, 0, 0, 0, 1)
|
|
||||||
qdel(src)
|
|
||||||
return
|
|
||||||
else
|
|
||||||
user << "<span class='notice'>You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out.</span>"
|
|
||||||
return
|
|
||||||
else
|
else
|
||||||
return ..()
|
visible_message("<span class='warning'>A red light on \the [src]'s control panel flashes briefly.</span>")
|
||||||
|
attempts--
|
||||||
|
if (attempts == 0)
|
||||||
|
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
|
||||||
|
var/turf/T = get_turf(src.loc)
|
||||||
|
explosion(T, 0, 0, 1, 2)
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/secure/loot/proc/check_input(var/input)
|
||||||
|
if(length(input) != codelen)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
. = 1
|
||||||
|
lastattempt.Cut()
|
||||||
|
for(var/i in 1 to codelen)
|
||||||
|
var/guesschar = copytext(input, i, i+1)
|
||||||
|
lastattempt += guesschar
|
||||||
|
if(guesschar != code[i])
|
||||||
|
. = 0
|
||||||
|
|
||||||
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(locked)
|
if(locked)
|
||||||
if (istype(W, /obj/item/weapon/card/emag))
|
|
||||||
user << "<span class='notice'>The crate unlocks!</span>"
|
|
||||||
locked = 0
|
|
||||||
if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
|
if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
|
||||||
user << "<span class='notice'>DECA-CODE LOCK REPORT:</span>"
|
user << "<span class='notice'>DECA-CODE LOCK ANALYSIS:</span>"
|
||||||
if (attempts == 1)
|
if (attempts == 1)
|
||||||
user << "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>"
|
user << "<span class='warning'>* Anti-Tamper system will activate on the next failed access attempt.</span>"
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>"
|
user << "<span class='notice'>* Anti-Tamper system will activate after [src.attempts] failed access attempts.</span>"
|
||||||
if (lastattempt != null)
|
if(lastattempt.len)
|
||||||
var/list/guess = list()
|
|
||||||
var/bulls = 0
|
var/bulls = 0
|
||||||
var/cows = 0
|
var/cows = 0
|
||||||
for(var/i = 1, i < codelen + 1, i++)
|
|
||||||
var/a = copytext(lastattempt, i, i+1) // Stuff the code into the list
|
var/list/code_contents = code.Copy()
|
||||||
guess += a
|
for(var/i in 1 to codelen)
|
||||||
guess[a] = i
|
if(lastattempt[i] == code[i])
|
||||||
for(var/i in guess) // Go through list and count matches
|
|
||||||
var/a = findtext(code, i)
|
|
||||||
if(a == guess[i])
|
|
||||||
++bulls
|
++bulls
|
||||||
else if(a)
|
else if(lastattempt[i] in code_contents)
|
||||||
++cows
|
++cows
|
||||||
|
code_contents -= lastattempt[i]
|
||||||
user << "<span class='notice'>Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
|
user << "<span class='notice'>Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
|
||||||
else ..()
|
return
|
||||||
else ..()
|
..()
|
||||||
|
|||||||
@@ -102,6 +102,7 @@
|
|||||||
handle_stunned()
|
handle_stunned()
|
||||||
handle_weakened()
|
handle_weakened()
|
||||||
handle_paralysed()
|
handle_paralysed()
|
||||||
|
update_canmove()
|
||||||
handle_supernatural()
|
handle_supernatural()
|
||||||
|
|
||||||
//Movement
|
//Movement
|
||||||
|
|||||||
@@ -56,6 +56,17 @@
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<div class="commit sansserif">
|
<div class="commit sansserif">
|
||||||
|
<h2 class="date">14 July 2015</h2>
|
||||||
|
<h3 class="author">HarpyEagle updated:</h3>
|
||||||
|
<ul class="changes bgimages16">
|
||||||
|
<li class="bugfix">Fixes wrong information being reported when analyzing locked abandoned crates with a multitool.</li>
|
||||||
|
</ul>
|
||||||
|
<h3 class="author">PsiOmegaDelta updated:</h3>
|
||||||
|
<ul class="changes bgimages16">
|
||||||
|
<li class="tweak">Ninjas can no longer teleport unto turfs that contain solid objects.</li>
|
||||||
|
<li class="tweak">Wizards can no longer etheral jaunt unto turfs that contain solid objects.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h2 class="date">11 July 2015</h2>
|
<h2 class="date">11 July 2015</h2>
|
||||||
<h3 class="author">HarpyEagle updated:</h3>
|
<h3 class="author">HarpyEagle updated:</h3>
|
||||||
<ul class="changes bgimages16">
|
<ul class="changes bgimages16">
|
||||||
|
|||||||
@@ -1968,3 +1968,10 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
|
|||||||
- bugfix: Turrets no longer burn holes through the AI.
|
- bugfix: Turrets no longer burn holes through the AI.
|
||||||
- tweak: Projectiles now have a chance of hitting mobs riding cargo trains.
|
- tweak: Projectiles now have a chance of hitting mobs riding cargo trains.
|
||||||
- bugfix: Fixed visual bugs with projectile effects.
|
- bugfix: Fixed visual bugs with projectile effects.
|
||||||
|
2015-07-14:
|
||||||
|
HarpyEagle:
|
||||||
|
- bugfix: Fixes wrong information being reported when analyzing locked abandoned
|
||||||
|
crates with a multitool.
|
||||||
|
PsiOmegaDelta:
|
||||||
|
- tweak: Ninjas can no longer teleport unto turfs that contain solid objects.
|
||||||
|
- tweak: Wizards can no longer etheral jaunt unto turfs that contain solid objects.
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
author: PsiOmegaDelta
|
|
||||||
changes:
|
|
||||||
- tweak: "Ninjas can no longer teleport unto turfs that contain solid objects."
|
|
||||||
- tweak: "Wizards can no longer etheral jaunt unto turfs that contain solid objects."
|
|
||||||
delete-after: true
|
|
||||||
Reference in New Issue
Block a user